GET_VECTOR_ROTATION_MATRIX(3alleg4)

πŸ’– get_vector_rotation_matrix β€” Allegro manual, bestie edition πŸ’–

okay so we're in the Allegro manual, and this page is literally about spinning stuff around an axis. it's giving math but make it cute. two whole functions, one for fixed girlies and one for the float girlies. no cap.


✨ NAME ✨

get_vector_rotation_matrix, get_vector_rotation_matrix_f β€” these two build X, Y, Z rotation matrices when you hand them an angle. they live in the Allegro game programming library, obviously. πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

void get_vector_rotation_matrix(MATRIX *m, fixed x, y, z, fixed a);

void get_vector_rotation_matrix_f(MATRIX_f *m, float x, y, z, float a);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. this function constructs a transformation matrix β€” and what that matrix does is rotate points around the vector you specify with x, y, z (that's your axis, bestie, your little arrow through space), by the angle you give it in a.

and here's the tea about that angle: it's in binary, 256 degrees to a circle format. so a full circle is 256, not 360. don't come at it with radians, it will not understand you. πŸŽ€

one version takes fixed values, the other takes float values. pick your fighter. both slay. ✨


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie 🫢 this was Allegro version 4.4.3, written down and everything, so go forth and rotate responsibly. mwah. πŸ’–βœ¨