package rainbowPackage;

public final class TrueArcTan
{
	public static final double ArcTan( double x, double y )
	{
		if ( x != 0 && y != 0 )
			return Math.atan2(x, y);
		if ( y == 0)
			if ( x >= 0 )
				return Math.PI / 2;
			else //if ( x < 0 )
				return -Math.PI / 2;
		else
			if ( y > 0 )
				return 0;
			else //if ( y < 0 )
				return -Math.PI;
	}
}