Math utilities.
npm install mpk/math#bcb9309
Clamp the input value to the specified bounds.
Test if the input values are equal within specified tolerance (default is 0.00001).
Map the input value from range [x1, x2] to range [y1, y2].
Map the input value from range [x1, x2] to range [y1, y2] and clamp the mapped value between y1 and y2.
Perform modulo operation (result has the same sign as divisor).
Generate pseudo-random float from [min, max) interval.
Generate pseudo-random integer from [min, max) interval.
Round the input value to the nearest multiple of the passed number.
Convert radians to degrees.
Convert degrees to radians.
MIT