al_fixceil(3alleg5)
β¨ 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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms