tan Function

Top  Previous  Next

Returns a number that represents the tangent of an angle.

Syntax

Math.tan(radians)

Arguments

radiansA number representing an angle (in radians).        

Return Value

A number representing  the tangent of an angle.

Examples

Math.tan(30);      // Returns -6.405331

Math.tan(60);      // Returns 0.3200404

Math.tan(90);      // Returns 1.569796

Math.tan(180);     // Returns -1.570696

Math.tan(0);       // Returns 0

See also

Math.atan2