math
Mathematical functions and constants.
Members
- e
- pi
- acos
- acosh
- asin
- asinh
- atan
- atan2
- atanh
- ceil
- copysign
- cos
- cosh
- degrees
- exp
- fabs
- floor
- gamma
- hypot
- log
- mod
- pow
- radians
- remainder
- round
- sin
- sinh
- sqrt
- tan
- tanh
e
math.efloatThe mathematical constant e (approximately 2.71828).
pi
math.pifloatThe mathematical constant pi (approximately 3.14159).
acos
math.acos(x)Returns the arccosine, in radians, of x.
xfloat | intInput valueresultfloatThe computed resultacosh
math.acosh(x)Returns the inverse hyperbolic cosine of x.
xfloat | intInput valueresultfloatThe computed resultasin
math.asin(x)Returns the arcsine, in radians, of x.
xfloat | intInput valueresultfloatThe computed resultasinh
math.asinh(x)Returns the inverse hyperbolic sine of x.
xfloat | intInput valueresultfloatThe computed resultatan
math.atan(x)Returns the arctangent, in radians, of x.
xfloat | intInput valueresultfloatThe computed resultatan2
math.atan2(x, y)Returns the arctangent of y/x, using the signs to determine the quadrant.
xfloat | intFirst input valueyfloat | intSecond input valueresultfloatThe computed resultatanh
math.atanh(x)Returns the inverse hyperbolic tangent of x.
xfloat | intInput valueresultfloatThe computed resultceil
math.ceil(x)Returns the least integer value greater than or equal to x.
xfloat | intInput valueresultfloatThe computed resultcopysign
math.copysign(x, y)Returns a value with the magnitude of x and the sign of y.
xfloat | intFirst input valueyfloat | intSecond input valueresultfloatThe computed resultcos
math.cos(x)Returns the cosine of the radian argument x.
xfloat | intInput valueresultfloatThe computed resultcosh
math.cosh(x)Returns the hyperbolic cosine of x.
xfloat | intInput valueresultfloatThe computed resultdegrees
math.degrees(x)Converts angle x from radians to degrees.
xfloat | intInput valueresultfloatThe computed resultexp
math.exp(x)Returns e raised to the power of x.
xfloat | intInput valueresultfloatThe computed resultfabs
math.fabs(x)Returns the absolute value of x.
xfloat | intInput valueresultfloatThe computed resultfloor
math.floor(x)Returns the greatest integer value less than or equal to x.
xfloat | intInput valueresultfloatThe computed resultgamma
math.gamma(x)Returns the Gamma function of x.
xfloat | intInput valueresultfloatThe computed resulthypot
math.hypot(x, y)Returns the square root of x*x + y*y.
xfloat | intFirst input valueyfloat | intSecond input valueresultfloatThe computed resultlog
math.log(x, base?)Returns the natural logarithm of x, or the logarithm of x in the given base.
xfloat | intValue to take the logarithm ofbase?optionalfloat | intLogarithm base (default: e)resultfloatThe logarithm of xmod
math.mod(x, y)Returns the floating-point remainder of x/y.
xfloat | intFirst input valueyfloat | intSecond input valueresultfloatThe computed resultpow
math.pow(x, y)Returns x raised to the power of y.
xfloat | intFirst input valueyfloat | intSecond input valueresultfloatThe computed resultradians
math.radians(x)Converts angle x from degrees to radians.
xfloat | intInput valueresultfloatThe computed resultremainder
math.remainder(x, y)Returns the IEEE 754 floating-point remainder of x/y.
xfloat | intFirst input valueyfloat | intSecond input valueresultfloatThe computed resultround
math.round(x)Returns the nearest integer, rounding half away from zero.
xfloat | intInput valueresultfloatThe computed resultsin
math.sin(x)Returns the sine of the radian argument x.
xfloat | intInput valueresultfloatThe computed resultsinh
math.sinh(x)Returns the hyperbolic sine of x.
xfloat | intInput valueresultfloatThe computed resultsqrt
math.sqrt(x)Returns the square root of x.
xfloat | intInput valueresultfloatThe computed resulttan
math.tan(x)Returns the tangent of the radian argument x.
xfloat | intInput valueresultfloatThe computed resulttanh
math.tanh(x)Returns the hyperbolic tangent of x.
xfloat | intInput valueresultfloatThe computed result