src/main/java/ch/frostnova/force/based/layout/geom/Vector.java
public final Vector rotate(Vector pivot, double angle) {

        double px = x - pivot.getX();
        double py = y - pivot.getY();
        double s = Math.sin(angle);
        double c = Math.cos(angle);

        double xnew = pivot.getX() + px * c - py * s;
        double ynew = pivot.getY() + px * s + py * c;

        return new Vector(xnew, ynew);
    }
/**
     * Rotate the vector
     *
     * @param pivot pivot point to rotate around
     * @param angle angle (radians) to rotate
     * @return rotated vector
     */
Rotate the vector
@param pivot pivot point to rotate around
@param angle angle (radians) to rotate
@return rotated vector
Rotate the vector @param pivot pivot point to rotate around @param angle angle ( radians ) to rotate @return rotated vector
public final Vector rotate(Vector pivot, double angle) {
        double px = x - pivot.getX();
        double py = y - pivot.getY();
        double s = Math.sin(angle);
        double c = Math.cos(angle);
        double xnew = pivot.getX() + px * c - py * s;
        double ynew = pivot.getY() + px * s + py * c;
        return new Vector(xnew, ynew);
    }
public final Vector rotate ( Vector pivot , double angle ) { double px = x - pivot . getX ( ) ; double py = y - pivot . getY ( ) ; double s = Math . sin ( angle ) ; double c = Math . cos ( angle ) ; double xnew = pivot . getX ( ) + px * c - py * s ; double ynew = pivot . getY ( ) + px * s + py * c ; return new Vector ( xnew , ynew ) ; }
Rotate the vector
 @param pivot pivot point to rotate around
 @param angle angle (radians) to rotate
 @return rotated vector
Rotate the vector @param pivot pivot point to rotate around @param angle angle ( radians ) to rotate @return rotated vector