Ejemplo n.º 1
0
  @Test
  public void testAddDouble() {
    Vector4 a = new Vector4(1, -1, 3, 5);
    Vector4 c = a.add(2d, 6d, -2d, 5d);

    doAssertDouble(3, c.x);
    doAssertDouble(5, c.y);
    doAssertDouble(1, c.z);
    doAssertDouble(10, c.w);
  }
Ejemplo n.º 2
0
  @Test
  public void testAddInt() {
    Vector4 a = new Vector4(1, -1, 3, 5);
    Vector4 c = a.add(2, 6, -2, 5);

    doAssertDouble(3, c.x);
    doAssertDouble(5, c.y);
    doAssertDouble(1, c.z);
    doAssertDouble(10, c.w);
  }
Ejemplo n.º 3
0
  @Test
  public void testAddFloat() {
    Vector4 a = new Vector4(1, -1, 3, 5);
    Vector4 c = a.add(2f, 6f, -2f, 5f);

    doAssertDouble(3, c.x);
    doAssertDouble(5, c.y);
    doAssertDouble(1, c.z);
    doAssertDouble(10, c.w);
  }