Math Methods

The following methods are supported for use with Math objects.

Method Description
Properties
E Returns Euler’s number (approximately 2.718).
LN2 Returns the natural logarithm of 2 (approximately 0.693).
LN10 Returns the natural logarithm of 10 (approximately 2.302).
PI Returns Pi (approximately 3.14159).
Methods
abs(x) Returns the absolute value of x.
acos(x) Returns the arccosine of x, in radians.
asin(x) Returns the arcsine of x, in radians.
atan(x) Returns the arctangent of x, as a numeric value between -Pi/2 and +Pi/2 radians.
ceil(x) Returns x, rounded up to the nearest integer.
cos(x) Returns the cosine of x (where x is in radians).
exp(x) Returns the value of Ex.
floor(x) Returns x, rounded down to the nearest integer.
log(x) Returns the natural logarithm (base E) of x.
max(x,y, z, ... , n) Returns the number with the highest value, using 2 arguments.
min(x,y, z, ... , n) Returns the number with the lowest value, using 2 arguments.
pow(x,y) Returns the value of x to the power of y.
random() Returns a random number between 0 and 1.
round(x) Rounds x to the nearest integer.
sin (x) Returns the sine of x (where x is in radians).
sqrt(x) Returns the square root of x.
tan(x) Returns the tangent of the angle x.