コード例 #1
0
ファイル: Vector4Test.java プロジェクト: Nefaro/SpoutAPI
  @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);
  }
コード例 #2
0
ファイル: Vector4Test.java プロジェクト: Nefaro/SpoutAPI
  @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);
  }
コード例 #3
0
ファイル: Vector4Test.java プロジェクト: Nefaro/SpoutAPI
  @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);
  }