@Test public void sub() { Vector a = new Vector(3, 3); Vector b = new Vector(1, 2); Vector result = a.sub(b); Assert.assertEquals(new Vector(2, 1), result); }
public Vector sub(Vector other) { return new Vector(x - other.x, y - other.y); }
Vector implements Serializable { public Vector sub(Vector other) { return new Vector(x - other.x, y - other.y); } }
Vector implements Serializable { public Vector sub(Vector other) { return new Vector(x - other.x, y - other.y); } Vector(double x, double y);  Vector(); }
Vector implements Serializable { public Vector sub(Vector other) { return new Vector(x - other.x, y - other.y); } Vector(double x, double y);  Vector(); static Vector fromVertexPosition(EPGMVertex v); void setVertexPosition(EPGMVertex v); Vector sub(Vector other); Vector add(Vector other); Vector mul(double factor); Vector div(double factor); double distance(Vector other); double scalar(Vector other); Vector clamped(double maxLen); Vector normalized(); double magnitude(); Vector confined(double minX, double maxX, double minY, double maxY); double angle(Vector other); Vector rotate(double angle); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); double getX(); void setX(double x); double getY(); void setY(double y); Vector set(double x, double y); Vector set(Vector other); Vector reset(); Vector copy(); Vector mSub(Vector other); Vector mAdd(Vector other); Vector mMul(double factor); Vector mDiv(double factor); Vector mClamped(double maxLen); Vector mNormalized(); Vector mConfined(double minX, double maxX, double minY, double maxY); Vector mRotate(double angle); }
Vector implements Serializable { public Vector sub(Vector other) { return new Vector(x - other.x, y - other.y); } Vector(double x, double y);  Vector(); static Vector fromVertexPosition(EPGMVertex v); void setVertexPosition(EPGMVertex v); Vector sub(Vector other); Vector add(Vector other); Vector mul(double factor); Vector div(double factor); double distance(Vector other); double scalar(Vector other); Vector clamped(double maxLen); Vector normalized(); double magnitude(); Vector confined(double minX, double maxX, double minY, double maxY); double angle(Vector other); Vector rotate(double angle); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); double getX(); void setX(double x); double getY(); void setY(double y); Vector set(double x, double y); Vector set(Vector other); Vector reset(); Vector copy(); Vector mSub(Vector other); Vector mAdd(Vector other); Vector mMul(double factor); Vector mDiv(double factor); Vector mClamped(double maxLen); Vector mNormalized(); Vector mConfined(double minX, double maxX, double minY, double maxY); Vector mRotate(double angle);  }