fixtof(3alleg4)

โœจ fixtof โœจ

okay bestie, welcome to the Allegro manual ๐Ÿ’– this lil page is all about fixtof โ€” yes that's a 3alleg4 situation, iykyk.


๐ŸŒธ NAME ๐ŸŒธ

fixtof โ€” converts a fixed point to floating point. it's giving Allegro game programming library energy ๐Ÿ‘‘


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

#include <allegro.h>

double fixtof(fixed x);

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so basically, fixtof takes your fixed point value and turns it into a floating point one. glow-up, but for numbers โœจ

example time, no cap:

float result;

/* This will put 33.33333 into `result'. */
result = fixtof(itofix(100) / 3);
/* This will put 16.66666 into `result'. */
result = fixtof(itofix(100) / 6);

likeโ€ฆ the math is mathing ๐Ÿงฎ๐Ÿ’…


๐Ÿ’œ SEE ALSO ๐Ÿ’œ


go read those too fr fr, they're the whole friend group ๐Ÿซถ

k bye, this was Allegro version 4.4.3, mwah ๐Ÿ’‹ stay iconic bestie ๐Ÿ‘‘๐ŸŒˆโญ