Math Reference List

The OpusScript Math functions are:

 

Function Name:

Description:

Math.abs

Returns the absolute value of a number

Math.acos

Returns the arccosine of a number (in radians)

Math.asin

Returns the arcsine of a number (in radians)

Math.atan

Returns the arctangent of a number (in radians)

Math.atan2

Returns the angle from the X-axis to a point

Math.ceil

Rounds a number up

Math.cos

Returns the cosine of a number

Math.E

Returns Euler’s constant e (approx. 2.718)

Math.exp

Returns E to the power of the argument passed

Math.floor

Rounds a number down

Math.LN10

Returns the natural log of 10 (approx. 2.303)

Math.log

Returns the natural log (base E) of a number

Math.LOG10E

Returns the base 10 log of E (approx. 0.434)

Math.max

Returns the larger of two values

Math.min

Returns the smaller of two values

Math.PI

Returns PI (approx. 3.1415)

Math.pow

Returns the first parameter raised to the power of the second

Math.random

Returns a pseudo-random number between 0 and 1

Math.round

Rounds to the nearest integer

Math.sin

Returns the sine of a number

Math.sqrt

Returns the square root of a number

Math.SQRT1_2

Returns the square root of ½ (approx. 0.707)

Math.SQRT2

Returns the square root of 2 (approx. 1.414)

Math.tan

Returns the tangent of a number

 

Related Topics:

OpusScript Reference List

Database Reference List

Date Reference List