Mathematical Functions
Static variables
Static methods
staticatan2(y:Float, x:Float):Float
Returns the arc tangent of y/x (in radians), but uses the signs of both parameters to find the quadrant of the result. (It also handles correctly the case of x being zero.)
staticfmod(x:Float):Float
Returns the remainder of the division of x by y that rounds the quotient towards zero.
staticfrexp(x:Float):MathFrexpResult
Returns m and e such that x = m2^e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero).
staticrandom(?m:Float, ?n:Float):Float
This function is an interface to the simple pseudo-random generator function rand provided by ANSI C. (No guarantees can be given for its statistical properties.)
When called without arguments, returns a uniform pseudo-random real number in the range [0,1).
When called with an integer number m
, returns a uniform pseudo-random integer in the range [1, m].
When called with two integer numbers m
and n
, returns a uniform pseudo-random integer in the range [m, n].
staticrandomseed(x:Float):Float
Sets x
as the "seed" for the pseudo-random generator: equal seeds produce equal sequences of numbers.