@Test public void length() throws Exception { Assert.assertEquals(5, vector2.length(), 0.1); }
public double length() { return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2)); }
D2Vector { public double length() { return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2)); } }
D2Vector { public double length() { return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2)); } D2Vector(double x, double y);  D2Vector(); }
D2Vector { public double length() { return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2)); } 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 double length() { return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2)); } 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; }