@Test public void add() throws Exception { Assert.assertEquals(new D2Vector(5, 7), vector1.add(vector2)); }
public D2Vector add(D2Vector other) { return new D2Vector(this.getX() + other.getX(), this.getY() + other.getY()); }
D2Vector { public D2Vector add(D2Vector other) { return new D2Vector(this.getX() + other.getX(), this.getY() + other.getY()); } }
D2Vector { public D2Vector add(D2Vector other) { return new D2Vector(this.getX() + other.getX(), this.getY() + other.getY()); } D2Vector(double x, double y);  D2Vector(); }
D2Vector { public D2Vector add(D2Vector other) { return new D2Vector(this.getX() + other.getX(), this.getY() + other.getY()); } D2Vector(double x, double y);  D2Vector(); double getX(); double getY(); D2Vector add(D2Vector other); D2Vector sub(D2Vector other); double length(); D2Vector scale(double scalar); @Override boolean equals(Object o); @Override int hashCode(); }
D2Vector { public D2Vector add(D2Vector other) { return new D2Vector(this.getX() + other.getX(), this.getY() + other.getY()); } D2Vector(double x, double y);  D2Vector(); double getX(); double getY(); D2Vector add(D2Vector other); D2Vector sub(D2Vector other); double length(); D2Vector scale(double scalar); @Override boolean equals(Object o); @Override int hashCode(); static final D2Vector UNIT; }