Math.tan()Function
Math.tan() method in Javascript.
How to calculate the tangent value of an angle in javascript?
Explanation
Math Function:Object:
MathMethod:
Math.tan()Description:To calculate the tangent value for an angle, use this function. For example lets try to get tan values for the angles 60,45.
Example:
<script type="text/javascript">
document.write('Tangent value of 60 degrees is::'+Math.tan(60));
document.write('</br>');
document.write('Tangent value of 45 degrees is::'+Math.tan(45));
</script>
Result:
In the above example,
- Math.tan() method returns a tan value for 60 degrees "0.32004".
- The tan value for the "45" degrees is "1.61977".