math.atan()

Type Function
Library math.*
Return value Number
Revision Current Public Release (2017.3135)
Keywords atan, arc tangent
See also math.tan()

Overview

Returns the arc tangent of a x in radians. The result will be in the range -pi/2 to pi/2.

Syntax

math.atan( x )
x (required)

Number. A number.

Examples

print("atan(0) = " .. math.atan(0))              --- result is 0
print("atan(inf) = " .. math.atan(math.huge))    --- result is +pi/2
print("atan(-inf) = " .. math.atan(-math.huge))  --- result is -pi/2