fixtorad_r(3)

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

πŸ’– fixtorad_r(3) πŸ’–

okay bestie, welcome to the Allegro manual page for fixtorad_r(3). This is the Allegro game programming library corner of the docs, and this constant is lowkey iconic: it's the ratio you use to turn a fixed point number in binary angle format into a fixed point number in radians. no cap. ✨


🌸 NAME 🌸

fixtorad_r β€” constant to convert angles in fixed point format to radians. Allegro game programming library. πŸŽ€


πŸ› οΈ SYNOPSIS πŸ› οΈ

#include <allegro.h>

extern const fixed fixtorad_r;

πŸ“– DESCRIPTION πŸ“–

So like, fixtorad_r is this constant that gives you a ratio. You can use that ratio to convert a fixed point number that's in binary angle format into a fixed point number that's in radians. fr fr, that's the whole vibe. πŸ’«

Here's the example from the page, and yes, it ate:

fixed rad_angle, binary_angle;
/* Set the binary angle to 90 degrees. */
binary_angle = 64;
/* Now convert to radians (about 1.57). */
rad_angle = fixmul(binary_angle, fixtorad_r);

πŸ‘€ SEE ALSO πŸ‘€


bye bestie, this page is serving Allegro version 4.4.3 realness β€” go convert some angles and slay πŸ’…πŸ¦‹

πŸ“¦ where this page comes from