get_z_rotate_matrix(3alleg4)

πŸ’« get_z_rotate_matrix β€” NAME πŸ’«

ok so bestie, meet get_z_rotate_matrix and get_z_rotate_matrix_f β€” they construct Z axis rotation matrices. ✨ that's the whole vibe. it's giving Allegro game programming library realness. πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

void get_z_rotate_matrix(MATRIX *m, fixed r);

void get_z_rotate_matrix_f(MATRIX_f *m, float r);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” these two build you a Z axis rotation matrix and tuck it right into m. no cap.

and then?? when you apply that matrix to a point, it rotates the point about the Z axis by the angle you gave it. πŸ’…

lowkey important detail: that angle is in binary, 256 degrees to a circle format. yes bestie, 256 degrees to a circle. that's the whole circle. do not come at me with your regular 360 degrees, this is the Allegro way and honestly? iconic. πŸ‘‘

🌈 SEE ALSO 🌈


and that's a wrap, bestie!! 🫢 this lil page came from the Allegro manual, version 4.4.3, and it lives under the name get_z_rotate_matrix(3alleg4). go rotate something, you main character. πŸ’–βœ¨πŸŽ€