fixfloor(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– 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