100
Java Math.acos() method
The java.lang.Math.acos() is used to calculate the trigonometric Arc Cosine of an angle. Arc cosine is also called as inverse of a cosine. This method returns the values between 0.0 and pi.
Syntax
Parameter
Return
- If the argument is positive or negative number, this method will return the Arc cosine value.
- If the argument is NaN or outside the range -1 and 1, this method will return NaN.
Example 1
Output:
0.0
Example 2
Output:
3.141592653589793
Example 3
Output:
NaN
Example 4
Output:
NaN
Example 5
Output:
1.5159376794536454
Next TopicJava Math