get_z_rotate_matrix(3)
π« 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, andris afloatfor the_fversion. 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
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms