/** * Returns the arc sine of the specified value, in the range of -<i>pi</i>/2 through <i>pi</i>/2. * * @param x the value whose arc sine is to be returned. * @return the arc sine in radians for the specified value. */ public static double asin(double x) { if (x < -1.0 || x > 1.0) return MathLib.NaN; if (x == -1.0) return -HALF_PI; if (x == 1.0) return HALF_PI; return MathLib.atan(x / MathLib.sqrt(1.0 - x * x)); }