al_transform_coordinates(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_transform_coordinates β€” bestie, this is your lil' coordinate glow-up function, straight out of the Allegro 5 API manual (yes, the 3alleg5 one, iykyk πŸ’…).


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro.h>

void al_transform_coordinates(const ALLEGRO_TRANSFORM *trans, float *x, float *y)

🌸 DESCRIPTION 🌸

Okay so picture this: you got a pair of coordinates, right? And you want them transformed. That's literally it. That's the whole job. This function takes a point and runs it through a transformation. Slay. πŸ‘‘

Parameters, bestie, let's go one by one:

  • trans β€” the transformation you wanna use. Your vibe-setter, your main character. πŸŽ€
  • x, y β€” pointers to the coordinates. Yes, pointers β€” it's not handed a copy, it gets the receipts, so they get updated in place. Not me being obsessed with pass-by-pointer fr fr. πŸ”₯
Heads up: it takes float *, not float. So pass the address of your variables, not the values. πŸ™ˆ

πŸ’œ SEE ALSO πŸ’œ


And that's the whole page, babe β€” this came from the Allegro reference manual, and it's the al_transform_coordinates(3alleg5) page specifically. Go forth and transform your coordinates. Periodt. 🫢✨🌸

πŸ“¦ where this page comes from