apply_quat(3alleg4)

✨ NAME ✨

okay so bestie, this is apply_quat β€” she multiplies a point by a quaternion πŸ’«. Like, that's her whole thing. Part of the Allegro game programming library, in case you were wondering where she lives πŸŽ€.


🌸 SYNOPSIS 🌸

#include <allegro.h>

void apply_quat(const QUAT *q, float x, y, z, *xout, *yout, *zout);

no cap, that's the whole signature πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

So here's the tea β˜• β€” apply_quat takes the point (x, y, z) and multiplies it by the quaternion q, then drops the glow-up into (*xout, *yout, *zout) ✨. Like, she rotates your point and hands you the new coordinates. Slay.

but bestie, listen 😭 β€” she is quite a bit slower than apply_matrix_f(). That's not a vibe check she passes. So only use her to translate a few points, okay? A tiny little handful. She's not built for crowds.

if you've got many points?? 🫢 it is much more efficient to call quat_to_matrix() first and then hit apply_matrix_f() β€” that's the iconic move, fr fr. Convert once, apply many. main character efficiency 🧚


and that's the whole page, bestie πŸ’–

this little love letter comes to you from Allegro, version 4.4.3, and she's filed under apply_quat(3alleg4) in the manual. mwah, go rotate something cute πŸ¦‹πŸŽ€