Returns the tangent of a number.
Method of Math
Static
Syntax
tan( x )
Parameters
Parameter | Description |
---|---|
x | A number |
Description
The tan method returns a numeric value that represents the tangent of the angle.
Because tan is a static method of Math, you always use it as Math.tan(), rather than as a method of a Math object you created.
Examples
The following function returns the tangent of the variable x:
See also
Math.acos, Math.asin, Math.atan, Math.atan2, Math.cos, Math.sin