get_vector_rotation_quat(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ get_vector_rotation_quat ✨

okay bestie, welcome to the Allegro manual, section 3, and today's main character is get_vector_rotation_quat πŸ’… she lives in the Allegro game programming library and she is here to spin your points around a vector, no cap.


🌸 NAME 🌸

get_vector_rotation_quat β€” constructs a quaternion to rotate points around a vector. it's giving 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 ✨ and that quaternion will rotate points around the vector you specify with x, y, z β€” and it does the spin by the angle you specify with a.

and here's the little detail that matters, bestie, do not skip it πŸ™ˆ the angle a is given in binary, 256 degrees to a circle format. yes. 256 degrees. a whole circle is 256. that's the vibe, that's the format, periodt.

so like… not radians, not the regular 360-degrees degrees. it's the 256-to-a-circle flavor, iykyk πŸ’«

ngl if you pass in a regular-degree angle here she will simply rotate your points to somewhere cursed 😭 256 degrees to a circle, fr fr.

πŸ‘‘ SEE ALSO πŸ‘‘

there's literally nothing else listed here, bestie β€” this is the whole page, and honestly? she ate πŸ’…


and that's the whole thing, gorgeous 🫢 this page is from Allegro, version 4.4.3, and yeah it's dated β€” so go forth and rotate your points around a vector, 256-degrees-to-a-circle style, and slay πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from