public double getAngle()
    {
        double angle;
        double rawAngle;

        // Let's avoid dividing by zero.
        if (_y == 0)
        {
            if (_x < 0)
            {
                angle = 3 * Math.PI / 2;
            } else
            {
                angle = Math.PI / 2;
            }
        }

        else
        {
            rawAngle = Math.atan(_y / _x);

            if (_x < 0)
            {
                // rawAngle is from the negative x axis.
                angle = Math.PI + rawAngle;
            } else if (_y < 0)
            {
                // rawAngle is relative to the correct axis, but negative.
                angle = 2 * Math.PI + rawAngle;
            } else
            {
                // It's already right! what're the chances? (1/4, technically)
                angle = rawAngle;
            }
        }
        return angle;
    }