mathlib¶
abs¶
Returns the absolute value of x
.
acos¶
Returns the arc cosine of x
(in radians).
asin¶
Returns the arc sine of x
(in radians).
atan¶
Returns the arc tangent of y/x
(in radians).
atan2¶
Returns the arc tangent of y/x
(in radians).
ceil¶
Returns the smallest integral value larger than or equal to x
.
cos¶
Returns the cosine of x
(assumed to be in radians).
cosh¶
Returns the hyperbolic cosine of x
(assumed to be in radians).
deg¶
Converts the angle x
from radians to degrees.
exp¶
Returns the value e^x
(where e
is the base of natural logarithms).
floor¶
Returns the largest integral value smaller than or equal to x
.
fmod¶
Returns the remainder of the division of x
by y
that rounds the quotient towards zero.
frexp¶
Decompose x
into tails and exponents. Returns m
and e
such that x = m * (2 ^ e)
, e
is an integer and the absolute value of m
is in the range [0.5, 1) (or zero when x
is zero).
huge¶
A value larger than any other numeric value.
ldexp¶
Returns m * (2 ^ e)
.
log¶
Returns the logarithm of x
in the given base.
log10¶
Returns the base-10 logarithm of x.
max¶
Returns the argument with the maximum value, according to the Lua operator <
.
maxinteger¶
Miss locale
min¶
Returns the argument with the minimum value, according to the Lua operator <
.
mininteger¶
Miss locale
modf¶
Returns the integral part of x
and the fractional part of x
.
pi¶
The value of π.
pow¶
Returns x ^ y
.
rad¶
Converts the angle x
from degrees to radians.
random¶
math.random()
: Returns a float in the range [0,1).math.random(n)
: Returns a integer in the range [1, n].math.random(m, n)
: Returns a integer in the range [m, n].
randomseed¶
math.randomseed(x, y)
: Concatenatex
andy
into a 128-bitseed
to reinitialize the pseudo-random generator.math.randomseed(x)
: Equate tomath.randomseed(x, 0)
.math.randomseed()
: Generates a seed with a weak attempt for randomness.
sin¶
Returns the sine of x
(assumed to be in radians).
sinh¶
Returns the hyperbolic sine of x
(assumed to be in radians).
sqrt¶
Returns the square root of x
.
tan¶
Returns the tangent of x
(assumed to be in radians).
tanh¶
Returns the hyperbolic tangent of x
(assumed to be in radians).
tointeger¶
Miss locale
type¶
Miss locale
ult¶
Miss locale