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 ⭐🌸