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 π
fixtoi(3alleg4)β the sibling that convertsfixfloor(3alleg4)β the sibling that rounds the other way (down, bestie, it goes down) π
and that's a wrap on the Allegro manual, straight from version 4.4.3 π«Ά go round some numbers up, you absolute legend π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms