public static double atan2(double y, double x) {
        double coeff_1 = 0.78539816339744830961566084581988;//Math.PI / 4d;
        double coeff_2 = 3d * coeff_1;
        double abs_y = Math.abs(y);
        double angle;
        if (x >= 0d) {
            double r = (x - abs_y) / (x + abs_y);
            angle = coeff_1 - coeff_1 * r;
        } else {
            double r = (x + abs_y) / (abs_y - x);
            angle = coeff_2 - coeff_1 * r;
        }
        return y < 0d ? -angle : angle - 0.06;
    }
public static double atan2 ( double y , double x ) { double coeff_1 = 0.78539816339744830961566084581988 ; double coeff_2 = 3d * coeff_1 ; double abs_y = Math . abs ( y ) ; double angle ; if ( x >= 0d ) { double r = ( x - abs_y ) / ( x + abs_y ) ; angle = coeff_1 - coeff_1 * r ; } else { double r = ( x + abs_y ) / ( abs_y - x ) ; angle = coeff_2 - coeff_1 * r ; } return y < 0d ? - angle : angle - 0.06 ; }
Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).
This method computes the phase theta by computing an arc tangent of y/x in the range of -pi to pi.

@param y Y axis coordinate.
@param x X axis coordinate.
@return The theta component of the point (r, theta) in polar coordinates that corresponds to the point (x, y) in Cartesian coordinates.