math — Mathematical functions

Power and logarithmic functions

math.log(x)

Returns the natural logarithm of x (to base e).

math.pow(x, y)

Returns x to the power of y.

math.sqrt(x)

Returns the square root of x.

Trigonometric functions

math.sin(x)

Returns the sine of x radians.

math.cos(x)

Returns the cosine of x radians.

math.tan(x)

Returns the tangent of x radians.

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.

Constants

Project Versions

Table Of Contents

Previous topic

net — Network functions

Next topic

time — Time functions

This Page