86
Java Math.tan() method
The java.lang.Math.tan() is used to return the trigonometric tangent of an angle.
Syntax
Parameter
Return
- If the argument is positive or negative number, this method will return the Tangent value.
- If the argument is NaN or infinity, this method will return NaN.
- If the argument is zero, this method will return zero with the same sign as the argument.
Example 1
Output:
0.9999999999999999
Example 2
Output:
1.7320508075688767
Example 3
Output:
NaN
Next TopicJava Math