GET_VECTOR_ROTATION_QUAT(3alleg4)

✨ get_vector_rotation_quat ✨

okay bestie, welcome to the Allegro manual, section 3alleg4 πŸŽ€ this one's a little math baddie and she EATS πŸ’…


πŸ’– NAME πŸ’–

get_vector_rotation_quat β€” constructs a quaternion to rotate points around a vector. Allegro game programming library. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <allegro.h>

void get_vector_rotation_quat(QUAT *q, float x, y, z, float a);

πŸ‘‘ DESCRIPTION πŸ‘‘

so basically? this function constructs a quaternion for you, and that quaternion will rotate points around the vector you specify with x, y, z β€” by the angle a that you also specify. πŸŒ€βœ¨

and the tea on that angle: it's given in binary, 256 degrees to a circle format. not your regular degrees, not radians, we're doing the 256-to-a-circle thing. iykyk 🫢


that's literally the whole page, bestie, she's short and she knows it πŸ’…

signing off from Allegro version 4.4.3 β€” mwah, go rotate something cute πŸŽ€πŸ’–βœ¨