CPU Expressions¶
Math API¶
The following is a summary of the available math API.
Input and output to all trig functions are given in radians.
float cos(float) |
Cosine trig function. |
float sin(float) |
Sine trig function. |
float tan(float) |
Tangent trig function. |
float acos(float) |
Inverse cosine trig function. |
float asin(float) |
Inverse sine trig function. |
float atan(float) |
Inverse tangent trig function. |
float atan2(float,float) |
Calculates the inverse of the trigonometric function tangent. The input is the y and x proportions. The returned angle is given in radian. |
float cosh(float) |
Hyperbolic trig function. |
float sinh(float) |
Hyperbolic trig function. |
float tanh(float) |
Hyperbolic trig function. |
float log(float) |
Natural logarithm |
float log10(float) |
Base 10 log |
float pow(float x,float y) |
Raises x to the power of y |
float sqrt(float) |
Square root of input |
float ceil(float) |
Returns the closest integer that is equal to or higher than the input |
float abs(float) |
Absolute value |
float floor(float) |
Returns the closest integer that is equal to or lower than the input |
float fraction(float) |
Returns the fraction of a number, ie what remains after taking away the integral number |
double cos(double) |
|
double sin(double) |
|
double tan(double) |
|
double acos(double) |
|
double asin(double) |
|
double atan(double) |
|
double atan2(double,double) |
|
double cosh(double) |
|
double sinh(double) |
|
double tanh(double) |
|
double log(double) |
|
double log10(double) |
|
double pow(double,double) |
|
double sqrt(double) |
|
double ceil(double) |
|
double abs(double) |
|
double floor(double) |
|
double fraction(double) |