Macaw OS C reference

Function flr

#include <macaw.h>
double flr(double n);

Rounds a number down to a whole number, as floor does: flr(2.7) is 2 and flr(-2.5) is -3.

Parameters

ndouble
The number to round. A number that isn't a real one (NaN or infinite) gives 0.

Returns double

The biggest whole number that isn't more than n, as a double.

In Handy maths for games, with rnd, mid, clamp, sgn, lerp.