get_x_rotate_matrix(3alleg4)
π NAME π
get_x_rotate_matrix, get_x_rotate_matrix_f β bestie, these two are here to construct X axis rotation matrices. It's giving Allegro game programming library energy, as always. π
β¨ SYNOPSIS β¨
#include <allegro.h>
void get_x_rotate_matrix(MATRIX *m, fixed r);
void get_x_rotate_matrix_f(MATRIX_f *m, float r);
Two lil functions, same job, different float flavor. Pick your fighter. π
π DESCRIPTION π
okay so listen. Both of these cuties construct X axis rotation matrices and tuck them right into m. That's the whole vibe. π«Ά
Then, when you apply one of those matrices to a point, it rotates that point about the X axis by the angle you handed over β and yes bestie, that angle is given in binary, 256 degrees to a circle format. Not your regular degrees. Not radians. The Allegro way. iykyk. π₯
So you're literally just saying "spin this thing around the X axis, this much," and the matrix does the rest. main character energy fr fr. πβ¨
heads up: the angle format is binary, 256 degrees to a circle β don't come in here with regular degrees, she will not understand you. π
π SEE ALSO π
apply_matrix(3alleg4)get_rotation_matrix(3alleg4)get_y_rotate_matrix(3alleg4)get_z_rotate_matrix(3alleg4)
Go read those too, bestie, they're all part of the rotation cinematic universe. π
and that's the whole page, periodt π this one came straight out of Allegro, version 4.4.3, filed under get_x_rotate_matrix(3alleg4) β slay, go rotate something. π¦β
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms