get_scaling_matrix(3alleg4)

πŸ’– get_scaling_matrix β€” bestie edition πŸ’–

okay so this is a page from the Allegro manual, and it's about making your stuff get bigger or smaller ✨ literally the glow-up function.


🌸 NAME 🌸

get_scaling_matrix, get_scaling_matrix_f β€” they construct a scaling matrix, no cap. Part of the Allegro game programming library πŸŽ€


✨ SYNOPSIS ✨

#include <allegro.h>

void get_scaling_matrix(MATRIX *m, fixed x, fixed y, fixed z);

void get_scaling_matrix_f(MATRIX_f *m, float x, float y, float z);

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, this function builds a scaling matrix and tucks it all cozy into m. 🫢

When you apply it to a point (px, py, pz), the matrix hands you back the point (px*x, py*y, pz*z). In other words β€” and I need you to hear me on this β€” it stretches or shrinks things πŸ’…

That's it. That's the whole vibe. Scale = stretch or shrink. Slay.


πŸ‘‘ SEE ALSO πŸ‘‘


k bye bestie, go scale something iconic πŸ’–βœ¨

this was Allegro, version 4.4.3, and the page itself is get_scaling_matrix(3alleg4) β€” mwah, drink water, stan a matrix πŸŽ€πŸŒˆ