Java Math.asin(double a)
Syntax
Math.asin(double a) has the following syntax.
public static double asin(double a)
Example
In the following code shows how to use Math.asin(double a) method.
/*from w ww .j ava2 s .co m*/
public class Main {
public static void main(String[] args) {
// get a variable x which is equal to PI/2
double x = Math.PI / 2;
// convert x to Radians
x = Math.toRadians(x);
// get the arc sine of x
System.out.println("Math.asin(" + x + ")=" + Math.asin(x));
}
}
The code above generates the following result.