fixceil(3alleg4)

✨ fixceil ✨

okay bestie, welcome to the Allegro manual πŸ’– this one's from the 3alleg4 section, and it's giving "tiny function, big rounding energy" πŸŽ€


πŸ’… NAME πŸ’…

fixceil β€” returns the smallest integer not less than x. yep that's the whole thing. also: it lives in the Allegro game programming library 🌈


🌸 SYNOPSIS 🌸

#include <allegro.h>

int fixceil(fixed x);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically? fixceil hands you back the smallest integer that is not less than x. no cap. it rounds towards positive infinity β€” like, it always looks up, never down, main character energy only πŸ‘‘

here's the vibe in code:

int result;
/* This will put 34 into `result'. */
result = fixceil(itofix(100) / 3);
/* This will round up to 17. */
result = fixceil(itofix(100) / 6);

see how it just… rounds up? iconic. periodt πŸ’…βœ¨


πŸ‘€ SEE ALSO πŸ‘€


and that's a wrap on the Allegro manual, straight from version 4.4.3 🫢 go round some numbers up, you absolute legend πŸ’œ