# math Library 🧮

Provides standard mathematical functions. Accessed via math.<function>.

Function Signature Description
math.abs(x) Returns the absolute value of x.
math.acos(x) Returns the arc cosine of x (in radians).
math.asin(x) Returns the arc sine of x (in radians).
math.atan(x) Returns the arc tangent of x (in radians).
math.atan2(y, x) Returns the arc tangent of y/x (in radians).
math.ceil(x) Returns the smallest integer greater than or equal to x.
math.cos(x) Returns the cosine of x (assumed to be in radians).
math.cosh(x) Returns the hyperbolic cosine of x.
math.deg(x) Converts angle x from radians to degrees.
math.exp(x) Returns the value ex.
math.floor(x) Returns the largest integer smaller than or equal to x.
math.fmod(x, y) Returns the remainder of the division of x by y.
math.frexp(x) Returns m and e such that x = m * 2e.
math.ldexp(m, e) Returns m * 2e.
math.log(x) Returns the natural logarithm of x.
math.log10(x) Returns the base-10 logarithm of x.
math.max(x, ...) Returns the maximum value among its arguments.
math.min(x, ...) Returns the minimum value among its arguments.
math.modf(x) Returns the integral and fractional parts of x.
math.pow(x, y) Returns xy.
math.rad(x) Converts angle x from degrees to radians.
math.random([m [, n]]) Returns a pseudo-random number.
math.randomseed(x) Sets x as the seed for the pseudo-random generator.
math.sin(x) Returns the sine of x (assumed to be in radians).
math.sinh(x) Returns the hyperbolic sine of x.
math.sqrt(x) Returns the square root of x.
math.tan(x) Returns the tangent of x (assumed to be in radians).
math.tanh(x) Returns the hyperbolic tangent of x.