Link

Math


^

x^y

Exponentiation. Use as any other arithmetic operator, like 5^(1/3). If exponent is integer, you can use negative base, otherwise you will get “nan” with negative base. If both arguments are integers, result will be integer.


abs

int/float abs(int/float x)

Absolute (positive) value of x.


arctan

float arctan(float x, float y)

Arctangent of x. Pass 1 as y (don’t ask…).


ceil

int ceil(float)

Round x to the nearest integer that is not less than x.


cos

float cos(float x)

Cosine of x


exponent

float exponent(float x)

E^X


floor2

sfall.h

int sfall_func1("floor2", int/float value)

Works just like vanilla floor function, but returns correct integers for negative values (vanilla floor function works exactly the same as ceil for negative values, much like trunc in C/C++).

This is a macro, you need to include sfall.h to use it.


log

float log(float x)

Natural logarithm of x.


round

int round(float x)

Round x to the nearest integer.


sin

float sin(float x)

Sine of x


sqrt

float sqrt(float x)

Square root of x.


tan

float tan(float x)

Tangent of x