The java.lang.Math.acos() returns the arc cosine of an angle in between 0.0 and pi. Arc cosine is also called as inverse of a cosine.If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
public static double acos(double a) Parameter : a : the value whose arc cosine is to be returned. Return : This method returns the arc cosine of the argument.
Example :To show working of java.lang.Math.acos() method.
NaN 1.5159376794536454 0.0 1.5707963267948966 3.141592653589793 NaN
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.