Module math

Source
Expand description

Functions related to mathematics.

Functions§

abs
Compute the absolute value of a number.
acos
Compute the arccosine of a number (in radians).
asin
Compute the arcsine of a number (in radians).
atan
Compute the arctangent of a number (in radians).
atan2
Compute the four quadrant arctangent of Y and X (in radians).
ceil
Compute the smallest integer greater than or equal to a number.
cos
Compute the cosine of a number (in radians).
e
Return the value of Euler’s number e.
floor
Compute the largest integer less than or equal to a number.
ln
Compute the natural logarithm of the number.
log
Compute the logarithm of the number with respect to an arbitrary base.
log2
Compute the base 2 logarithm of the number.
log10
Compute the base 10 logarithm of the number.
max
Compute the maximum of the given arguments.
min
Compute the minimum of the given arguments.
pi
Return the value of pi. Archimedes’ constant (π).
pow
Compute the number to a power.
rem
Compute the remainder after dividing num by div. If num is negative, the result will be too.
round
Round a number to the nearest integer.
sin
Compute the sine of a number (in radians).
sqrt
Compute the square root of a number.
tan
Compute the tangent of a number (in radians).
tau
Return the value of tau. The full circle constant (τ). Equal to 2π.
to_degrees
Converts a number from radians to degrees.
to_radians
Converts a number from degrees to radians.