This class provides mathematical operations for internal purposes.
Static variables
staticinlineread onlyPI:Float = 3.14159265358979
The ratio of the circumference of a circle to its diameter.
Static methods
staticinlinerandIn(min:Float, max:Float):Float
Returns a random value from min
inclusive to max
exclusive.
staticinlinerandVec3():Vec3
Returns a random Vec3
from (-1.0, -1.0, -1.0)
inclusive to (1.0, 1.0, 1.0)
exclusive.
staticinlinerandVec3In(min:Float, max:Float):Vec3
Returns a random Vec3
from (min, min, min)
inclusive to (max, max, max)
exclusive.
staticinlinesafeAcos(x:Float):Float
Returns Math.acos(clamp(-1, x, 1))
.
This never returns NaN
as long as x
is not NaN
.
staticinlinesafeAsin(x:Float):Float
Returns Math.asin(clamp(-1, x, 1))
.
This never returns NaN
as long as x
is not NaN
.