class Math

Static class containing common mathematical functions.

Global Functions

float Abs (const float)Absolute of x.
float Acos (const float)Returns the inverse cosine of x.
float[] Add (const float[], const float[])Returns an array containing the result of x[n] + y[n].
float Asin (const float)Returns the inverse sine of x.
float Atan (const float)Returns the arc tangent of x.
float Atan2 (const float, const float)Computes the arc tangent of y / x.
float Ceil (const float)Returns the smallest integral value that is not less than x.
float Cos (const float)Computes the cosine of x.
float Cosh (const float)Computes the hyperbolic cosine of x.
float Exp (const float)Returns the exponential of x.
float Floor (const float)Returns the largest integral value that is not greater than x.
float Frac (const float)Returns the fraction of x.
float Integer (const float)Returns the integer of x.
float Lin (const float, const float, const float)Linear interpolates between x and y using z.
float Log (const float)Computes the natural logarithm of x.
float Log10 (const float)Computes the common (base-10) logarithm of x.
float Max (const float, const float)Returns the greater of both values.
float Min (const float, const float)Returns the smaller of both values.
float[] Mul (const float[], const float[])Returns an array containing the result of x[n] * y[n].
float Pow (const float, const float)Returns x raised to the power y.
float[] Proc (const float[], const float[], Math::user)Returns an array containing the result of user(x[n], y[n]).
float Prod (const float[])Returns the product of all values.
float Sgn (const float)Returns the sign of x.
float Sin (const float)Computes the sine of x.
float Sinh (const float)Computes the hyperbolic sine of x.
float Sqrt (const float)Computes the square root of x.
float Sum (const float[])Returns the sum of all values.
float Tan (const float)Returns the tangent of x.
float Tanh (const float)Returns the hyperbolic tangent of x.

Reference

function float Abs (const float x)

Absolute of x.

The result is always a positive number.


function float Acos (const float x)

Returns the inverse cosine of x.


function float[] Add (const float[] x, const float[] y)

Returns an array containing the result of x[n] + y[n].

It is not required that both arrays have the same number of elements. For example, if x[] has 2 elements and y[] is larger, every even element of y[] is added to x[0] and every odd element of y[] is added to x[1].


function float Asin (const float x)

Returns the inverse sine of x.


function float Atan (const float x)

Returns the arc tangent of x.


function float Atan2 (const float x, const float y)

Computes the arc tangent of y / x.


function float Ceil (const float x)

Returns the smallest integral value that is not less than x.


function float Cos (const float x)

Computes the cosine of x.


function float Cosh (const float x)

Computes the hyperbolic cosine of x.


function float Exp (const float x)

Returns the exponential of x.


function float Floor (const float x)

Returns the largest integral value that is not greater than x.


function float Frac (const float x)

Returns the fraction of x.


function float Integer (const float x)

Returns the integer of x.


function float Lin (const float x, const float y, const float z)

Linear interpolates between x and y using z.


function float Log (const float x)

Computes the natural logarithm of x.


function float Log10 (const float x)

Computes the common (base-10) logarithm of x.


function float Max (const float x, const float y)

Returns the greater of both values.


function float Min (const float x, const float y)

Returns the smaller of both values.


function float[] Mul (const float[] x, const float[] y)

Returns an array containing the result of x[n] * y[n].

It is not required that both arrays have the same number of elements. For example, if x[] has 2 elements and y[] is larger, every even element of y[] is multiplied by x[0] and every odd element of y[] is multiplied by x[1].


function float Pow (const float x, const float y)

Returns x raised to the power y.


function float[] Proc (const float[] x, const float[] y, Math::user fn)

Returns an array containing the result of user(x[n], y[n]).

It is not required that both arrays have the same number of elements. For example, if x[] has 2 elements and y[] is larger, every even element of y[] is processed with x[0] and every odd element of y[] is processed with x[1].


function float Prod (const float[] x)

Returns the product of all values.


function float Sgn (const float x)

Returns the sign of x.


function float Sin (const float x)

Computes the sine of x.


function float Sinh (const float x)

Computes the hyperbolic sine of x.


function float Sqrt (const float x)

Computes the square root of x.


function float Sum (const float[] x)

Returns the sum of all values.


function float Tan (const float x)

Returns the tangent of x.


function float Tanh (const float x)

Returns the hyperbolic tangent of x.