94
Java Math.atan() method
The java.lang.Math.atan() is used to calculate the trigonometric Arc Tangent of an angle. Arc Tangent is also called as inverse of a tangent. This method returns the values between -pi/2 and pi/2.
Syntax
Parameter
Return
- If the argument is positive or negative number, this method will return the Arc Tangent value.
- If the argument is NaN, 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:
1.4125642791467878
Example 2
Output:
-0.7853981633974483
Example 3
Output:
0.0
Example 4
Output:
1.2626272556789115
Example 5
Output:
NaN
Next TopicJava Math