@Test public void testSubtractDouble() { Vector4 a = new Vector4(1, -1, 4, -2); Vector4 c = a.subtract(2d, 6d, 4d, 1d); doAssertDouble(-1, c.x); doAssertDouble(-7, c.y); doAssertDouble(0, c.z); doAssertDouble(-3, c.w); }
@Test public void testSubtractInt() { Vector4 a = new Vector4(1, -1, 4, -2); Vector4 c = a.subtract(2, 6, 4, 1); doAssertDouble(-1, c.x); doAssertDouble(-7, c.y); doAssertDouble(0, c.z); doAssertDouble(-3, c.w); }
@Test public void testSubtractFloat() { Vector4 a = new Vector4(1, -1, 4, -2); Vector4 c = a.subtract(2f, 6f, 4f, 1f); doAssertDouble(-1, c.x); doAssertDouble(-7, c.y); doAssertDouble(0, c.z); doAssertDouble(-3, c.w); }