develop wherever and whenever you want...
Docs > Math Class Summary

Math Class Summary

The math class is a single object that has various mathematical constants and functions.

number Math.E 
Natural logarithm constant value

number Math.LN10 
Natural logarithm of 10 constant value.

number LN2 
Natural logarithm of 2 constant value.

number LOG2E 
Number value of logarithm of base-2 value of e.

number LOG10E 
Number value of logarithm of base-10 value of e.

number PI 
Constant value for pi.

number SQRT1_2 
Square root of 1/2.

number SQRT2 
Square root of 2.

number Number.abs(x) 
Absolute value of x.

number Number.acos(x) 
Absolute value of arc cosine of x.

number Number.asin(x) 
Absolute value of arc sine of x.

number Number.atan(x) 
Absolute value of arc tangent of x.

number Number.atan2(y,x) 
Return the arc tangent of y / x.

number Number.ceil(x) 
Smallest integer that is equal or greater than x.

number Number.cos(x) 
Absolute value of cosine of x.

number Number.exp(x) 
Absolute value of arc exponent of x (e to the power x).

number Number.floor(x) 
Smallest integer that is less than or equal to x.

number Number.log(x) 
Absolute value of logarithm of x.

number Number.max(v1,v2[,v3,...]) 
Return maximum value of a set of numbers.

number Number.min(v1,v2[,v3,...]) 
Return minimum value of a set of numbers.

number Number.pow(x,y) 
Absolute value of x to the power y.

number Number.random() 
Absolute random value between 0 and 1.

number Number.round(x) 
Closest integer to x.

number Number.sin(x) 
Absolute value of the sine of x.

number Number.sqrt(x) 
Absolute value of the square root of x.

number Number.tan(x) 
Absolute value of the tangent of x.