fixtoi(3alleg4)
π NAME π
omg hi bestie, welcome to the fixtoi(3alleg4) page from the Allegro manual. This is your girl fixtoi β she converts a fixed point to integer with rounding. It's giving Allegro game programming library energy, periodt. π
β¨ SYNOPSIS β¨
okay so first you gotta include the Allegro header, then call her like this:
#include <allegro.h>
int fixtoi(fixed x);
That's it, no cap. π«Ά
π¦ DESCRIPTION π¦
fixtoi converts fixed point to integer, rounding as required to the nearest integer. Literally that's the whole job. She's not messy, she rounds properly to the nearest integer. πΈ
Example, bestie:
int result;
/* This will put 33 into `result'. */
result = fixtoi(itofix(100) / 3);
/* But this will round up to 17. */
result = fixtoi(itofix(100) / 6);
π SEE ALSO π
itofix(3alleg4)ftofix(3alleg4)fixtof(3alleg4)fixfloor(3alleg4)fixceil(3alleg4)ex12bit(3alleg4)ex3buf(3alleg4)ex3d(3alleg4)exblend(3alleg4)excustom(3alleg4)exlights(3alleg4)exspline(3alleg4)exstars(3alleg4)exupdate(3alleg4)
mwah π that's the whole fixtoi(3alleg4) page, brought to you by Allegro version 4.4.3. stay iconic, bestie π«Άβ¨
π¦ 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