Home >>Java Math Methods >Java Math.acos() method
Java Math.acos() is used to measure the angle of the trigonometric Arc Cosine. Sometimes called Arc cosine as an inverse of a cosine. This process gives back values between 0.0 and pi.
public static double acos(double a)
a = This parameter is used to the value whose arc cosine is to be returned.
It is used to returns the arc cosine of the argument.
public class MyClass
{
public static void main(String[] args)
{
double x = 1.0;
System.out.println(Math.acos(x));
}
}
public class MyClass
{
public static void main(String[] args)
{
double x = -1.0;
System.out.println(Math.acos(x));
}
}