get_z_rotate_matrix(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’« get_z_rotate_matrix β€” the rotate-yo-whole-vibe-around-Z situation πŸ’«

okay bestie, so this is from the Allegro manual, the game programming library, and we're in section 3 of the manuals (get_z_rotate_matrix(3) if you're keeping score) πŸŽ€


✨ NAME ✨

get_z_rotate_matrix, get_z_rotate_matrix_f β€” these two build you a Z axis rotation matrix. That's it, that's the whole job. Allegro game programming library behavior, no cap πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

void get_z_rotate_matrix(MATRIX *m, fixed r);

void get_z_rotate_matrix_f(MATRIX_f *m, float r);

like. two functions. one for the fixed-point girlies, one for the float girlies. pick your fighter πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

So what we're doing here is constructing Z axis rotation matrices, and we're storing them in m. That's the assignment. That's the task. And she ate, honestly.

Now the fun part: when you apply one of these matrices to a point, it will rotate that point about the Z axis by the angle you specified. Spinning. Rotating. Main character energy around the Z axis, periodt.

The angle is given in binary, 256 degrees to a circle format. So like, a full circle isn't 360 in here, it's 256. It's giving "different unit system, same iconic rotation." Don't come for me, that's literally what the manual says πŸ™ˆ

⚠️ heads up bestie: the angle format is the 256-degrees-to-a-circle binary thing for the fixed version, and r is a float for the _f version. Just. Keep that in mind. iykyk.

πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, you're so welcome πŸ’–

this little love letter comes to you courtesy of Allegro, version 4.4.3 β€” mwah, go rotate something, bestie 🫢✨🌸

πŸ“¦ where this page comes from