@Test public void testMultiply_NaN() throws Exception { assertTrue("1st Nan", hasNaN(new Vec2(3, 4).multiply(Double.NaN))); assertTrue("2nd Nan", hasNaN(new Vec2(Double.NaN, 4).multiply(5))); assertTrue("2nd Nan", hasNaN(new Vec2(3, Double.NaN).multiply(5))); }
public Vec2 multiply(double scalar) { this.x *= scalar; this.y *= scalar; return this; }
Vec2 { public Vec2 multiply(double scalar) { this.x *= scalar; this.y *= scalar; return this; } }
Vec2 { public Vec2 multiply(double scalar) { this.x *= scalar; this.y *= scalar; return this; } Vec2();  Vec2(double x, double y);  Vec2(Vec2 vector); }
Vec2 { public Vec2 multiply(double scalar) { this.x *= scalar; this.y *= scalar; return this; } Vec2();  Vec2(double x, double y);  Vec2(Vec2 vector); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); float[] toArray(float[] result, int offset); double magnitude(); double magnitudeSquared(); double distanceTo(Vec2 vector); double distanceToSquared(Vec2 vector); Vec2 set(double x, double y); Vec2 set(Vec2 vector); Vec2 swap(Vec2 vector); Vec2 add(Vec2 vector); Vec2 subtract(Vec2 vector); Vec2 multiply(double scalar); Vec2 multiplyByMatrix(Matrix3 matrix); Vec2 divide(double divisor); Vec2 negate(); Vec2 normalize(); double dot(Vec2 vector); Vec2 mix(Vec2 vector, double weight); }
Vec2 { public Vec2 multiply(double scalar) { this.x *= scalar; this.y *= scalar; return this; } Vec2();  Vec2(double x, double y);  Vec2(Vec2 vector); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); float[] toArray(float[] result, int offset); double magnitude(); double magnitudeSquared(); double distanceTo(Vec2 vector); double distanceToSquared(Vec2 vector); Vec2 set(double x, double y); Vec2 set(Vec2 vector); Vec2 swap(Vec2 vector); Vec2 add(Vec2 vector); Vec2 subtract(Vec2 vector); Vec2 multiply(double scalar); Vec2 multiplyByMatrix(Matrix3 matrix); Vec2 divide(double divisor); Vec2 negate(); Vec2 normalize(); double dot(Vec2 vector); Vec2 mix(Vec2 vector, double weight); public double x; public double y; }