Description
The tan() method returns a number that represents the tangent of an angle.
This method has the form:
Math.tan(x)
Parameter | Description |
---|---|
x | (required) A number representing an angle (in radians) |
Examples
The following example shows the basic use of this method.
<script>
document.write(Math.tan(0));
document.write("<br />");
document.write(Math.tan(90));
</script>
This produces the following result:
Browser Support
Firefox | IE | Chrome | Opera | Safari |
---|---|---|---|---|