} else if (Math.abs(getM13() - comp.getM13()) > Matrix4.ALLOWED_DEVIANCE) { return false; } else if (Math.abs(getM20() - comp.getM20()) > Matrix4.ALLOWED_DEVIANCE) { return false; } else if (Math.abs(getM21() - comp.getM21()) > Matrix4.ALLOWED_DEVIANCE) {
} else if (Math.abs(getM13() - comp.getM13()) > Matrix4.ALLOWED_DEVIANCE) { return false; } else if (Math.abs(getM20() - comp.getM20()) > Matrix4.ALLOWED_DEVIANCE) { return false; } else if (Math.abs(getM21() - comp.getM21()) > Matrix4.ALLOWED_DEVIANCE) {
@Override public ResultSample doInverse3Test(final int count, final int maxCount, final long timeOutMS) { final Matrix4 mat = a3dMatrixRandom(); final Matrix3 m1 = new Matrix3( // mat.getM00(), mat.getM01(), mat.getM02(), // mat.getM10(), mat.getM11(), mat.getM12(), // mat.getM20(), mat.getM21(), mat.getM22()); mat.setIdentity(); final long start = System.currentTimeMillis(); int loopCount = 0; while (System.currentTimeMillis() - start < timeOutMS && loopCount != maxCount) { ++loopCount; for (int i = 0; i < count; ++i) { m1.invertLocal(); } } return populateResult(System.currentTimeMillis() - start, loopCount, mat.set(m1).toArray(null)); }
assertTrue(0.0 == mat4A.getM12()); assertTrue(1.3 == mat4A.getM13()); assertTrue(0.0 == mat4A.getM20()); assertTrue(0.0 == mat4A.getM21()); assertTrue(1.0 == mat4A.getM22());
} else if (getM13() != comp.getM13()) { return false; } else if (getM20() != comp.getM20()) { return false; } else if (getM21() != comp.getM21()) {
} else if (getM13() != comp.getM13()) { return false; } else if (getM20() != comp.getM20()) { return false; } else if (getM21() != comp.getM21()) {
assertTrue(6 == mat4A.getM12()); assertTrue(7 == mat4A.getM13()); assertTrue(8 == mat4A.getM20()); assertTrue(9 == mat4A.getM21()); assertTrue(10 == mat4A.getM22()); assertTrue(9 == mat4A.getM12()); assertTrue(13 == mat4A.getM13()); assertTrue(2 == mat4A.getM20()); assertTrue(6 == mat4A.getM21()); assertTrue(10 == mat4A.getM22());
assertTrue(2.0 * 2 + 2.2 * 6 + 2.4 * 10 + 2.6 * 14 == result.getM12()); assertTrue(2.0 * 3 + 2.2 * 7 + 2.4 * 11 + 2.6 * 15 == result.getM13()); assertTrue(4.0 * 0.5 + 4.2 * 4 + 4.4 * 8 + 4.6 * 12 == result.getM20()); assertTrue(4.0 * 1 + 4.2 * 5 + 4.4 * 9 + 4.6 * 13 == result.getM21()); assertTrue(4.0 * 2 + 4.2 * 6 + 4.4 * 10 + 4.6 * 14 == result.getM22()); assertTrue(2.0 * 2 + 2.2 * 6 + 2.4 * 10 + 2.6 * 14 == mat4A.getM12()); assertTrue(2.0 * 3 + 2.2 * 7 + 2.4 * 11 + 2.6 * 15 == mat4A.getM13()); assertTrue(4.0 * 0.5 + 4.2 * 4 + 4.4 * 8 + 4.6 * 12 == mat4A.getM20()); assertTrue(4.0 * 1 + 4.2 * 5 + 4.4 * 9 + 4.6 * 13 == mat4A.getM21()); assertTrue(4.0 * 2 + 4.2 * 6 + 4.4 * 10 + 4.6 * 14 == mat4A.getM22());
assertTrue(6 == mat4A.getM12()); assertTrue(7 == mat4A.getM13()); assertTrue(8 == mat4A.getM20()); assertTrue(9 == mat4A.getM21()); assertTrue(10 == mat4A.getM22()); assertTrue(9 == mat4A.getM12()); assertTrue(13 == mat4A.getM13()); assertTrue(2 == mat4A.getM20()); assertTrue(6 == mat4A.getM21()); assertTrue(10 == mat4A.getM22()); assertTrue(6 == mat4A.getM12()); assertTrue(7 == mat4A.getM13()); assertTrue(8 == mat4A.getM20()); assertTrue(9 == mat4A.getM21()); assertTrue(10 == mat4A.getM22()); assertTrue(9 == mat4A.getM12()); assertTrue(13 == mat4A.getM13()); assertTrue(2 == mat4A.getM20()); assertTrue(6 == mat4A.getM21()); assertTrue(10 == mat4A.getM22());
assertTrue(1.2 == mat4A.getM12()); assertTrue(1.3 == mat4A.getM13()); assertTrue(2.0 == mat4A.getM20()); assertTrue(2.1 == mat4A.getM21()); assertTrue(2.2 == mat4A.getM22()); assertTrue(1.2 == mat4B.getM12()); assertTrue(1.3 == mat4B.getM13()); assertTrue(2.0 == mat4B.getM20()); assertTrue(2.1 == mat4B.getM21()); assertTrue(2.2 == mat4B.getM22()); assertTrue(1.2 == mat4C.getM12()); assertTrue(1.3 == mat4C.getM13()); assertTrue(2.0 == mat4C.getM20()); assertTrue(2.1 == mat4C.getM21()); assertTrue(2.2 == mat4C.getM22());