fixfloor(3)
π fixfloor(3) π
okay so bestie, gather round, because we're reading the Allegro manual together and today's main character is fixfloor. she's a lil math girlie and she is so useful, no cap. π
β¨ NAME β¨
fixfloor β Returns the greatest integer not greater than x. Allegro game programming library.
like. she floors things. that's her whole vibe. πΈ
π¦ SYNOPSIS π¦
#include <allegro.h>
int fixfloor(fixed x);
π DESCRIPTION π
okay so here's the tea: fixfloor returns the greatest integer not greater than x. which is a fancy way of saying it rounds towards negative infinity. she never rounds up, she never betrays you, she just goes down. periodt. π
here's an example so you can see her slay:
int result;
/* This will put 33 into `result'. */
result = fixfloor(itofix(100) / 3);
/* And this will round down to 16. */
result = fixfloor(itofix(100) / 6);
the way that 100/3 becomes 33 and 100/6 rounds down to 16β¦ it's giving precision, it's giving consistency, it's giving exactly what you asked for. π₯
π SEE ALSO π
and that's the whole page bestie, you ate that. π this iconic lil page came to you straight from Allegro, version 4.4.3 β go forth and floor responsibly, queen. π«Άβ¨
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms