qscale_matrix(3alleg4)

πŸ’– qscale_matrix β€” the Allegro manual, but make it cute πŸ’–

okay bestie, welcome to the Allegro manual page for qscale_matrix and qscale_matrix_f ✨ this is from the Allegro game programming library, and it's literally the glow-up shortcut you didn't know you needed 🫢


✨ NAME ✨

qscale_matrix, qscale_matrix_f β€” optimised routine for scaling an already generated matrix. Allegro game programming library. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <allegro.h>

void qscale_matrix(MATRIX *m, fixed scale);

void qscale_matrix_f(MATRIX_f *m, float scale);

so like, two flavors, one for fixed and one for float, because Allegro said "why choose" πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. this is the optimised routine for scaling an already generated matrix ✨ and the way it works is genuinely so smart: it simply adds in the scale factor.

that's it. that's the whole flex. πŸŽ€

the point is that there is no need to build two temporary matrices and then multiply them together. none. zero. not happening. we're skipping the whole middle school group project and going straight to the answer, no cap πŸ”₯

so if you already have a matrix and you just want it scaled, this is your girl. main character energy, minimal drama, maximum efficiency πŸ’œ


🌈 SEE ALSO 🌈


and that's the whole page bestie!! πŸ’– this was the Allegro manual, version 4.4.3, and honestly? iconic. go scale something. periodt. πŸ’…βœ¨πŸ¦‹