get_x_rotate_quat(3)

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

✨ get_x_rotate_quat πŸ’…

okay bestie, we're in the Allegro manual today and the page is literally called get_x_rotate_quat(3) β€” yes, the whole girl gang is here: get_x_rotate_quat, get_y_rotate_quat, and get_z_rotate_quat. quaternion rotation era 🌈✨


πŸŽ€ NAME πŸŽ€

get_x_rotate_quat, get_y_rotate_quat, get_z_rotate_quat β€” they construct axis rotation quaternions for you. also? this is the Allegro game programming library, so you already know it's giving legendary. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <allegro.h>

void get_x_rotate_quat(QUAT *q, float r);

void get_y_rotate_quat(QUAT *q, float r);

void get_z_rotate_quat(QUAT *q, float r);

like… three whole functions, same energy, different axis. pick your fighter. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• β€” these functions construct axis rotation quaternions, and they store them right into q. that's it, that's the whole job, and they ate. πŸ”₯

when you apply one of these quaternions to a point, it will rotate that point about the relevant axis β€” x for get_x_rotate_quat, y for get_y_rotate_quat, z for get_z_rotate_quat, iykyk β€” by the angle you pass in.

and the angle? it's r, and it's given in binary, 256 degrees to a circle format. so like, a full circle is 256, not 360. don't come at me, that's just the vibe Allegro chose. πŸ’…


🫢 fr fr bestie: r is a float, q is a QUAT *, and the rotation is about the relevant axis. that's the entire lore, no cap.

anyway, this page is from Allegro version 4.4.3, and it's the get_x_rotate_quat(3) manual page, mwah πŸ’‹ thanks for reading my little Unix rant, go rotate something iconic. πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from