public Vector2d rotate(double x, double y) {
        final double length = length();
        if (Math.abs(length) < GenericMath.DBL_EPSILON) {
            throw new ArithmeticException("Cannot rotate by the zero complex");
        }
        final double nx = this.x / length;
        final double ny = this.y / length;
        return new Vector2d(x * nx - y * ny, y * nx + x * ny);
    }
public Vector2d rotate(double x, double y) {
        final double length = length();
        if (Math.abs(length) < GenericMath.DBL_EPSILON) {
            throw new ArithmeticException("Cannot rotate by the zero complex");
        }
        final double nx = this.x / length;
        final double ny = this.y / length;
        return new Vector2d(x * nx - y * ny, y * nx + x * ny);
    }
public Vector2d rotate ( double x , double y ) { final double length = length ( ) ; if ( Math . abs ( length ) < GenericMath . DBL_EPSILON ) { throw new ArithmeticException ( "Cannot rotate by the zero complex" ) ; } final double nx = this . x / length ; final double ny = this . y / length ; return new Vector2d ( x * nx - y * ny , y * nx + x * ny ) ; }
Rotates the double components of a vector by this complex.

@param x The x component of the vector
@param y The y component of the vector
@return The rotated vector
Rotates the double components of a vector by this complex .