math.tan()

Type Function
Library math.*
Return value Number
Revision 2017.3075
Keywords tan, tangent
See also math.atan()
math.atan2()

Overview

Returns the tangent of x (the angle in radians).

Syntax

math.tan( x )
x (required)

Number. The angle in radians.

Examples

print(math.tan(-math.pi/2))   ---> a very large negative number
print(math.tan(math.pi/4))    ---> 1
print(math.tan(math.pi/2))    ---> a very large number