math
Contains math functions and constants
Constants
E
: number = 2.718281828459045
PI
: number = 3.141592653589793
Functions
abs(x)
- absolute value of x
acos(x)
- arc cosine
asin(x)
- arc sine
atan(x)
- arc tangent
atan2(y, x)
- returns angle θ whose tangent is the ratio of two numbers
cbrt(x)
- cube root
ceil(x)
- returns the ceiling of x
Example
ceil(6.4) // 7
copySign(magnitude, sign)
cos(x)
- trigonometric cosine
cosh(x)
- hyperbolic cosine
exp(x)
- ex
expm1(x)
- ex-1
floor(x)
- returns floor of x
Example
floor(3.8) // 3
getExponent(x)
hypot(x, y)
IEEEremainder(x, y)
log(x)
log1p(x)
log10(x)
max(x, y)
min(x, y)
nextAfter(x, y)
nextUp(x)
pow(x, y)
rint(x)
round(x)
signum(x)
sin(x)
sinh(x)
sqrt(x)
tan(x)
tanh(x)
toDegrees(x)
toRadians(x)
ulp(x)