al_fixceil(3alleg5)

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

✨ al_fixceil ✨

ok so bestie, welcome to the Allegro 5 API corner of the man pages, specifically al_fixceil from section 3alleg5 πŸ’– this one is short, sweet, and honestly kinda iconic.


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

int al_fixceil(al_fixed x);

like yes, that's the whole thing. one function, one job, no drama πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• al_fixceil hands you back the smallest integer that is not less than x. read that again. not less than. meaning it rounds towards positive infinity β€” always up, never down, no matter how tiny the fractional part is πŸ’…

so like if you were at 33.0000001, you're getting bumped to 34. that's just the vibe. the ceiling is the limit, literally, iykyk ✨

πŸ“ Example πŸ“

look at this gorgeous little snippet:

int result;

/* This will put 34 into `result'. */
result = al_fixceil(al_itofix(100) / 3);

/* This will round up to 17. */
result = al_fixceil(al_itofix(100) / 6);

see how the first one lands on 34 and the second one rounds up to 17? that's her. that's the whole personality πŸ”₯ no cap.


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too bestie, they're the sibling functions and they ate fr fr 🫢


🌈 quick reminder: this is the Allegro reference manual page for al_fixceil(3alleg5) β€” that's the manual name and the section, so now you know exactly where you are in the docs, periodt πŸ’œ

ok that's it, go round some numbers up, love u, bye πŸ§šβœ¨πŸ’–

πŸ“¦ where this page comes from