### Functions

The following functions are available in your GPU scripts (case insensitive).

MATHS
ABS(param) Returns the absolute value of the parameter. Example: ABS (-3) returns 3.
AVERAGE(param1; param2) Returns the average of a list of values. This function can have between 2 and 10 parameters separated by semicolons.
CLAMP(param; min; max) If param is in the range [min; max], returns param. If param is smaller than min, returns min. If param is greater than max, returns max.
Example: CLAMP (5; 10; 20) returns 10, CLAMP (15; 10; 20) returns 15 and CLAMP (25; 10; 20) returns 20.
EXP(param) Returns the exponential of param: eparam.
LOG(param) Returns the natural logarithm of param: ln (param).
LOG10(param) Returns the decimal logarithm of param: log10 (param) = ln (param) / ln (10).
LOG2(param) Returns the binary logarithm of param: log2 (param) = ln (param) / ln (2).
MIN(param1; param2) Returns the minimum of a list of values. This function can have between 2 and 10 parameters separated by semicolons.
MAX(param1; param2) Returns the maximum of a list of values. This function can have between 2 and 10 parameters separated by semicolons.
POW(param1; param2) Returns param1 to the param2 power: param1param2.
SIGN(param) Returns 1 if param is strictly positive, -1 if param is strictly negative, 0 if param is null.
SQR(param) Returns the square of param, i.e. param * param.
SQRT(param) Returns the square root of param.
TRIGONOMETRY
SIN(angle) Returns the sine of angle expressed in radians.
SIND(angle) Returns the sine of angle expressed in degrees.
ASIN(param) Returns the arc sine of param, expressed in radians. Param value must be between -1 and 1.
ASIND(param) Returns the arc sine of param, expressed in degrees. Param value must be between -1 and 1.
COS(angle) Returns the cosine of angle expressed in radians.
COSD(angle) Returns the cosine of angle expressed in degrees.
ACOS(param) Returns the arc cosine of param, expressed in radians. Param value must be between -1 and 1.
ACOSD(param) Returns the arc cosine of param, expressed in degrees. Param value must be between -1 and 1.
TAN(angle) Returns the tangent of angle expressed in radians.
TAND(angle) Returns the arc tangent of angle expressed in degrees.
ATAN(param) Returns the arc tangent of param, expressed in radians, with a value between -PI/2 and PI/2.
ATAND(param) Returns the arc tangent of param, expressed in degrees, with a value between -90Â° and 90Â°.
ATAN2(x,y) Returns the arc tangent of y/x, expressed in radians, with a value between -PI and PI.
ATAN2D(x,y) Returns the arc tangent of y/x, expressed in degrees, with a value between -180Â° and 180Â°.