get_translation_matrix(3alleg4)

✨ NAME ✨

get_translation_matrix, get_translation_matrix_f β€” bestie these build you a translation matrix πŸ’« (from the Allegro game programming library, iykyk)


🌸 SYNOPSIS 🌸

#include <allegro.h>

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

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

πŸŽ€ DESCRIPTION πŸŽ€

okay so. get_translation_matrix constructs a translation matrix and stores it in m. that's it, that's the whole vibe. πŸ’…

when you apply this matrix to the point (px, py, pz), it will produce the point (px+x, py+y, pz+z) β€” literally just adds x to the x, y to the y, z to the z. math is so iconic sometimes.

in other words, it moves things sideways. periodt. πŸ¦‹

and the _f version? same energy, same everything, except it takes floats and a MATRIX_f instead of fixeds and a MATRIX. slay. ✨

πŸ‘‘ SEE ALSO πŸ‘‘

go read those next bestie, they're part of the same little friend group 🫢


written for Allegro, version 4.4.3 β€” no cap, that's the whole page. go translate something, you absolute main character πŸŒˆπŸ’–πŸŽ€