Language Reference
Documentation

Language

Objects
Internet Objects

Math Class

Has Constructor: NO, Can Create Instance: NO
Can Subclass: NO

The Math object is an intrinsic object that provides access to math functions. That is you do not define a math object or a new instance. Math is a global variable that you can use any time. Attempting to create a new math object will result in an error.

Methods

VAL
Syntax: Math.VAL(value as string) as float
This function returns the string as a number.

HEX
Syntax: Math.HEX(num as integer) as string
This function returns the hex representation of a number.

RND
Syntax: Math.RND() as float
This function returns a random number from 0 to 1.

Random
Syntax: Math.Random(rngStart as integer, rngEnd as integer) as integer
This function returns a random number from rngStart to rngEnd.

ABS
Syntax: Math.ABS(number as float) as float
This function returns number rounded to the nearest integer.

ACOS
Syntax: Math.ACOS(number as float) as float
This function returns the acos of a number in radians.

ATAN
Syntax: Math.ATAN(number as float) as float
This function returns the atan of a number in radians.

ATAN2
Syntax: Math.ATAN2(x as float,y as float) as float
This function returns the arctangent in radians of a point in x,y.

ASIN
Syntax: Math.ASIN(number as float) as float
This function returns the acos of a number in radians.

BIN
Syntax: Math.BIN(number as float) as string
This function returns the binary representation of a number as a string.

HEX
Syntax: Math.HEX(number as float) as string
This function returns the hexadecimal representation of a number as a string.

OCT
Syntax: Math.OCT(number as float) as string
This function returns the octal representation of a number as a string.

CEIL
Syntax: Math.CEIL(number as float) as integer
This function returns number rounded up to the nearest integer.

FLOOR
Syntax: Math.FLOOR(number as float) as integer
This function returns number rounded down to the nearest integer.

EXP
Syntax: Math.EXP(value as float) as float
This function returns “e” raised to the power of value.

LOG
Syntax: Math.LOG(number as float) as float
This function returns the natural logarithm of a number.

MAX
Syntax: Math.MAX(number1 as float,number2 as float) as float
This function returns the larger of the two numbers given.

MIN
Syntax: Math.MIN(number1 as float,number2 as float) as float
This function returns the smaller of the two numbers given.

POW
Syntax: Math.POW(number as float,value as float) as float
This function returns number raised to the power of value.

ROUND
Syntax: Math.ROUND(number as float) as integer
This function returns number rounded to the nearest integer.

SQRT
Syntax: Math.SQRT(number as float) as float
This function returns the square root of number.

SIN
Syntax: Math.SIN(number as float) as float
This function returns the sin of a number.

TAN
Syntax: Math.TAN(angle as float) as float
This function returns the tangent in radians of an angle expressed in radians.