Math Methods

The following displays a summary of the math methods. Detailed descriptions of each method follow the table.

MethodDescription

abs

Returns the absolute value of a number.

acos

Returns the arccosine (in radians) of a number.

asin

Returns the arcsine (in radians) of a number.

atan

Returns the arctangent (in radians) of a number.

atan2

Returns the arctangent of the quotient of its arguments.

ceil

Returns the smallest integer greater than or equal to a number.

cos

Returns the cosine of a number.

exp

Returns Enumber, where number is the argument, and E is Euler's constant, the base of the natural logarithms.

floor

Returns the largest integer less than or equal to a number.

log

Returns the natural logarithm (base E) of a number.

max

Returns the greater of two numbers.

min

Returns the lesser of two numbers.

pow

Returns base to the exponent power, that is, baseexponent.

random

Returns a pseudo-random number between 0 and 1.

round

Returns the value of a number rounded to the nearest integer.

sin

Returns the sine of a number.

sqrt

Returns the square root of a number.

tan

Returns the tangent of a number.