Using Functions and Constants

The Math stage provides several functions that can be used in an expression. Functions take the general form function(parameter); function(parameter,parameter); function(parameter,...), where "parameter" is a numeric constant, a variable, or a math expression. Functions can be used with other math expressions (for example: x=Sin(y)*Cos(z)).

Constants, Conversion, Math, and Trigonometry

Each of the supported functions is listed below within its corresponding category.

Table 1. Supported Functions

Function

Description

Constants
e A mathematical constant that is the base of the natural algorithm.
false A Boolean constant that represents the value false.
Infinity A mathematical constant that represents infinity.
NaN A mathematical constant that represents a value that is not a number.
Pi A mathematical constant that is the ratio of the circumference of a circle to its diameter.
true a Boolean constant that represents the value true.
Conversion
Abs (value)

Takes one parameter.

Returns the absolute value of the given value.

Ceil (value)

Takes one parameter.

Returns a rounded-up value (for example, Ceil(5.5) returns 6).
DegToRad (value)

Takes one parameter.

Converts a given value from degrees to radians.
Floor (value)

Takes one parameter.

Returns a rounded-down value (for example, Floor(5.5) returns 5).
RadToDeg (value)

Takes one parameter.

Converts a given value from radians to degrees.
Round (value)

Takes one parameter.

Returns a rounded value.
Math

Avg (value, value,...)

Takes one or more parameters.

Returns the average of all given values.

Exp (value)

Takes one parameter.

Returns Euler's number raised to the power of the value.
Fac (value)

Takes one parameter.

Returns the factorial of a given value (for example, Fac(6) is computed to 6*5*4*3*2*1 and returns 720).
Ln (value)

Takes one parameter.

Returns the natural logarithm (base e) of a given value.
Log (value)

Takes one parameter.

Returns the natural logarithm (base 10) of a given value.
Max (value, value,...)

Takes one or more parameters.

Returns the maximum value passed in.

Min (value, value,...)

Takes one or more parameters.

Returns the minimum value passed in.
Sqrt (value)

Takes one or more parameters.

Returns the square root of the value passed in.
Sum (value)

Takes one parameter.

Returns the sum of the given values.
Trigonometry

ArcCos (value)

Takes one parameter.

Returns the arc cosine of a value.

ArcSin (value)

Takes one parameter.

Returns the arc sine of a value.
ArcTan (value)

Takes one parameter.

Returns the arc tangent of a value.
Cos (value)

Takes one parameter.

Returns the cosine of a value.
Ln (value)

Takes one parameter.

Returns the natural logarithm (base e) of a given value.
Sin (value)

Takes one parameter.

Returns the sine of a value.
Tan (value)

Takes one parameter.

Returns the tangent of a value.