Math Class¶
Math class¶
Almost compatible with JavaScript's Math.
Implemented methods:
abs (absolute value)
acos (arc cosine)
asin (arc sine)
atan (arc tangent)
atan2 (two-argument arc tangent)
ceil (round up)
floor (round down)
exp (e to the power of n)
log (natural logarithm)
max (the larger of two values)
min (the smaller of two values)
random (random number from 0 up to, but not including, 1)
pow (power)
round (round to the nearest integer)
sin (sine)
cos (cosine)
tan (tangent)
sqrt (square root)
Implemented properties:
E (e)
LN10 (log(10))
LN2 (log(2))
LOG10E (base-10 logarithm of e)
LOG2E (base-2 logarithm of e)
PI (π)
SQRT1_2 (sqrt(1/2))
SQRT2 (sqrt(2))