quat_mul(3alleg4)
π quat_mul β the Allegro manual's quaternion glow-up π
okay bestie, welcome to the Allegro manual page for quat_mul, and trust me, this one is a whole vibe. it's short, it's sweet, it's giving math but make it fashion. let's get into it π¦
β¨ NAME β¨
quat_mul β Multiplies two quaternions. Allegro game programming library.
π SYNOPSIS π
no cap, here's the tea:
#include <allegro.h>
void quat_mul(const QUAT *p, const QUAT *q, QUAT *out);
π DESCRIPTION π
so what does it do?? it multiplies two quaternions, and it stores the result in out. simple. iconic. main character energy fr fr.
here's the part that actually matters though β the resulting quaternion has the same effect as the combination of p and q. like, when you apply it to a point:
(point * out) = ((point * p) * q)
yes bestie, that's the whole point (pun intended π). you can concatenate any number of rotations this way, just stacking them up like your skincare routine. obsessed.
β οΈ okay but hear me β quaternion multiplication is not commutative. that means quat_mul(p, q) != quat_mul(q, p). order matters, babes. it's giving "outfit first, then shoes" not "shoes first, then outfit." do not flip them and act surprised π
π«Ά and that's the page!! no notes, she's perfect, she's brief, she ate.
this little gem lives in the Allegro manual, and it's from version 4.4.3. go forth and multiply (quaternions, specifically) πΈβ¨π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms