math
Module
The math
module provides functions to use the built-in Vanadin logger.
To import the math
module, use the import
keyword:
import { sqrt, ... } from 'math';
Functions
sqrt(x)
Returns the square root of x
.
pow(base, exp)
Returns the value of base
raised to the power of exp
.
sin(x)
Returns the sine of x
.
cos(x)
Returns the cosine of x
.
tan(x)
Returns the tangent of x
.
asin(x)
Returns the arc sine of x
.
acos(x)
Returns the arc cosine of x
.
atan(x)
Returns the arc tangent of x
.
sinh(x)
Returns the hyperbolic sine of x
.
cosh(x)
Returns the hyperbolic cosine of x
.
tanh(x)
Returns the hyperbolic tangent of x
.
asinh(x)
Returns the inverse hyperbolic sine of x
.
acosh(x)
Returns the inverse hyperbolic cosine of x
.
atanh(x)
Returns the inverse hyperbolic tangent of x
.
exp(x)
Returns the exponential of x
.
log(x, base)
Returns the logarithm of x
with the given base.
log2(x)
Returns the base-2 logarithm of x
.
log10(x)
Returns the base-10 logarithm of x
.
floor(x)
Returns the largest integer less than or equal to x
.
ceil(x)
Returns the smallest integer greater than or equal to x
.
round(x)
Returns the value of x
rounded to the nearest integer.
Constants
E
Euler's number e
PI
Archimedes' constant π