fixhypot(3)

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

✨ fixhypot(3) ✨

okay bestie, welcome to the Allegro manual πŸ’– β€” we're doing the fixhypot page today and it's literally the cutest lil math function you ever did see πŸŽ€


πŸ’… NAME πŸ’…

fixhypot β€” fixed point hypotenuse. it's from the Allegro game programming library, periodt 🫢


🌸 SYNOPSIS 🌸

#include <allegro.h>

fixed fixhypot(fixed x, fixed y);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, fixhypot is a fixed point hypotenuse β€” and what that actually means is it returns the square root of x*x + y*y πŸ‘‘

so yeah it's Pythagoras but make it fixed point ✨

now here's the tea: you could totally just calculate the formula yourself manually, and honestly nobody's stopping you, but this function should be better than doing that, because the error is much smaller 😌 like, noticeably smaller. the precision is giving main character energy. so just use fixhypot, bestie, it's the whole reason it exists πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

  • Allegro

and that's the whole page, no cap 🌈 go forth and compute your hypotenuses with tiny error, you icon πŸ‘‘

Allegro version 4.4.3 πŸ¦‹ mwah, love u, bye πŸ’–

πŸ“¦ where this page comes from