@Test public void testDot() { Vector2 v0 = new Vector2(4, 2); Vector2 v1 = new Vector2(7, -3); assertEquals(22, v0.dot(v1), delta); }
public double dot(Vector2 v) { return this.x * v.x + this.y * v.y; }
Vector2 implements IsSerializable { public double dot(Vector2 v) { return this.x * v.x + this.y * v.y; } }
Vector2 implements IsSerializable { public double dot(Vector2 v) { return this.x * v.x + this.y * v.y; } Vector2();  Vector2(double x, double y); }
Vector2 implements IsSerializable { public double dot(Vector2 v) { return this.x * v.x + this.y * v.y; } Vector2();  Vector2(double x, double y); Vector2 clone(); double getX(); void setX(double x); double getY(); void setY(double y); Vector2 add(Vector2 rhs); Vector2 subtract(Vector2 nodePosition); double length(); Vector2 rotate(double angle); double distance(Vector2 other); double distanceSquared(Vector2 other); String toString(); String toJSON(); void normalize(); double dot(Vector2 v); }
Vector2 implements IsSerializable { public double dot(Vector2 v) { return this.x * v.x + this.y * v.y; } Vector2();  Vector2(double x, double y); Vector2 clone(); double getX(); void setX(double x); double getY(); void setY(double y); Vector2 add(Vector2 rhs); Vector2 subtract(Vector2 nodePosition); double length(); Vector2 rotate(double angle); double distance(Vector2 other); double distanceSquared(Vector2 other); String toString(); String toJSON(); void normalize(); double dot(Vector2 v);  }