Type Function Library math.* Return value Number Revision Current Public Release (2018.3326) Keywords atan, arc tangent See also math.tan()
Returns the arc tangent of a x
in radians. The result will be in the range -pi/2
to pi/2
.
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 |