zmath.aux

Some auxiliar math funtions

Members

Functions

clamp
T clamp(T x)

Clamps a float point between -1.0 and +1.0

cmpFloat
int cmpFloat(T a, U b, T maxRelDiff, T maxAbsDiff)

Compare two float point numbers with assuming that are equal if are in range of maxAbsDiff

toDegrees
T toDegrees(T x)

Converts angles in radians to degrees

toRadians
T toRadians(T x)

Converts angles in degrees to radians

Manifest constants

M_1_180
enum M_1_180;

Inverse of 180

Meta