get_rotation_quat(3alleg4)
π« get_rotation_quat β it's giving "spin me right round" β¨
okay bestie, welcome to the Allegro manual, section 3alleg4 π β yes that's the manual name, we're not copy-pasting the header line, we're just casually name-dropping it like it's nothing π
πΈ NAME πΈ
get_rotation_quat β constructs a quaternion to rotate points around all three axes. it's the Allegro game programming library, obviously π«Ά
π¦ SYNOPSIS π¦
#include <allegro.h>
void get_rotation_quat(QUAT *q, float x, float y, float z);
look at that signature. three axes of pure rotation potential. main character energy fr fr π₯
π DESCRIPTION π
so like. this function builds you a quaternion. a whole quaternion. and that quaternion will rotate points around all three axes by the amounts you specify. the amounts are given in binary, 256 degrees to a circle format β yes bestie, a full circle is 256 in this house, that's just how Allegro does it, no cap π
you hand it a pointer to your QUAT and your x, y, and z amounts, and it hands you back a rotation. iconic behaviour honestly π
lowkey important: the angles are in that 256-degrees-to-a-circle format, not your regular 360-degree degrees. don't be out here passing 180 and expecting a half turn, that's not the vibe π
π SEE ALSO π
exquat(3alleg4)β go read it, it's the whole point of this vibe π§
that's the whole page, bestie, you ate it π this was Allegro version 4.4.3, and you were just reading get_rotation_quat from manual section 3alleg4. go rotate something gorgeous, periodt βπΈ
π¦ 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