6.7 – Mathematical Functions

This library provides basic mathematical functions. It provides all its functions and constants inside the table math. Functions with the annotation "integer/float" give integer results for integer arguments and float results for float (or mixed) arguments. Rounding functions (math.ceil, math.floor, and math.modf) return an integer when the result fits in the range of an integer, or a float otherwise.

math.deg()

math.deg (x) Converts the angle x from radians to degrees.

2017-02-21 04:15:03
math.maxinteger

math.maxinteger

2017-02-21 04:15:09
math.max()

math.max (x, ···) Returns the argument with the maximum value, according to the Lua operator <. (integer/float)

2017-02-21 04:15:08
math.tan()

math.tan (x) Returns the tangent of x (assumed to be in radians).

2017-02-21 04:15:15
math.pi

math.pi The value of π.

2017-02-21 04:15:11
math.min()

math.min (x, ···) Returns the argument with the minimum value, according to the Lua operator <. (integer/float)

2017-02-21 04:15:09
math.ult()

math.ult (m, n) Returns a boolean, true if and only if integer m is below integer n when they are compared as unsigned integers.

2017-02-21 04:15:19
math.fmod()

math.fmod (x, y) Returns the remainder of the division of x by y that rounds the quotient towards zero. (integer/float)

2017-02-21 04:15:06
math.ceil()

math.ceil (x) Returns the smallest integral value larger than or equal to x.

2017-02-21 04:15:01
math.huge

math.huge The float value HUGE_VAL, a value larger than any other numeric value.

2017-02-21 04:15:06