Return to homepage

DOSATO

Copyright © 2024 Sebastiaan Heins

3.1 Math

Constants

double: MATH_PI

MATH_PI is a variable defined in the MATH library, it is the value of PI, with double precision. 3.14159265358979323846

double: MATH_E

MATH_E is a variable defined in the MATH library, it is the value of E, with double precision. 2.71828182845904523536

Functions

double ABS (double val)

Returns the absolute value of the given value.

long ROUND (double val)

Returns the rounded value of the given value.

long FLOOR (double val)

Returns the floor value of the given value.

long CEIL (double val)

Returns the ceiling value of the given value.

double POW (double base, double exponent)

Returns the base to the power of the exponent.

double SQRT (double val)

Returns the square root of the given value.

double MIN (long|double|array a, double b = ?)

Returns the smallest value of the given values, or the smallest value in the given array.

double MAX (long|double|array a, double b = ?)

Returns the largest value of the given values, or the largest value in the given array.

double LOG (double val)

Returns the natural logarithm of the given value.

double LOG10 (double val)

Returns the base 10 logarithm of the given value.

double LOG2 (double val)

Returns the base 2 logarithm of the given value.

double EXP (double val)

Converts the given value from degrees to radians.

double SIN (double val)

Returns the sine of the given value.

double COS (double val)

Returns the cosine of the given value.

double TAN (double val)

Returns the tangent of the given value.

double ASIN (double val)

Returns the arcsine of the given value.

double ACOS (double val)

Returns the arccosine of the given value.

double ATAN (double val)

Returns the arctangent of the given value.

double ATAN2 (double y, double x)

Returns the arctangent of the given values.

double CLAMP (double val, double min, double max)

Clamps the given value between the given minimum and maximum values.