Java Math.acos(double a)
Syntax
Math.acos(double a) has the following syntax.
public static double acos(double a)
Example
In the following code shows how to use Math.acos(double a) method.
//w w w . j a v a2s.co m
public class Main {
public static void main(String[] args) {
double x = Math.PI / 2;
x = Math.toRadians(x);
System.out.println("Math.acos(" + x + ")=" + Math.acos(x));
}
}
The code above generates the following result.