Core JavaScriptExtendScript only
Object

Math

A global object containing a set of math functions and constants.

Properties

NameType AccessDescription
static Number = 2.7182818284590452354 readonly Euler's constant and the base of natural logarithms.
static Number = 2.302585092994046 readonly The natural logarithm of 10.
static Number = 0.6931471805599453 readonly The natural logarithm of 2.
static Number = 0.4342944819032518 readonly The base 10 logarithm of e.
static Number = 1.4426950408886934 readonly The base 2 logarithm of e.
static Number = 3.14159265358979323846 readonly The ratio of the circumference of a circle to its diameter.
static Number = 0.7071067811865476 readonly The reciprocal of the square root of 1/2.
static Number = 1.4142135623730951 readonly The square root of 2.

Methods

Number

Returns the absolute value of a number.

x Number A number.
Number

Returns the arc cosine(in radians) of a number.

x Number A number.
Number

Returns the arc sin(in radians) of a number.

x Number A number.
Number

Returns the arc tangent(in radians) of a number.

x Number A number.
Number

Returns the arc tangent of the quotient of its arguments (y/x).

y Number A number.
x Number A number.
Number

Rounds the number up to the nearest integer.

x Number A number.
Number

Returns the cosine of an angle provided in radians.

x Number An angle, in radians.
Number

Returns Math.E raised to the power of a number.

x Number A number.
Number

Rounds a number down to the nearest integer.

x Number A number.
Number

Returns the natural logarithm of a number.

x Number A number.
Number

Returns the largest of zero or more numbers.

value1, value2, ... Number Numbers.
Number

Returns the smallest of zero or more numbers.

value1, value2, ... Number Numbers.
Number

Returns a pseudo-random number from 0.0 up to but not including 1.0.

Number

Rounds a number to the nearest integer.

x Number A number.
Number

Returns the sine of an angle provided in radians.

x Number An angle, in radians.
Number

Returns the square root of a number.

x Number A number.
Number

Returns the tangent of an angle provided in radians.

x Number An angle, in radians.