@Test
public void testDeterminant() {

  {
    final double //
    a = -3, b = 2, c = -5, d = 2, //
        e = -1, f = 0, g = -2, h = 3, //
        i = 1, j = -3, k = -4, l = 0, //
        m = 4, n = 2, o = 3, p = 1;
    final Matrix4 mat4A = new Matrix4( //
        a, b, c, d, //
        e, f, g, h, //
        i, j, k, l, //
        m, n, o, p);
    // prepare sections
    final double m00 = new Matrix3(f, g, h, j, k, l, n, o, p).determinant();
    final double m01 = new Matrix3(e, g, h, i, k, l, m, o, p).determinant();
    final double m02 = new Matrix3(e, f, h, i, j, l, m, n, p).determinant();
    final double m03 = new Matrix3(e, f, g, i, j, k, m, n, o).determinant();
    final double determinant = a * m00 - b * m01 + c * m02 - d * m03;
    assertTrue(Math.abs(determinant - mat4A.determinant()) <= MathUtils.EPSILON);
  }
  {
    final double //
    a = -1.2, b = 4, c = -2.5, d = 1.7, //
        e = 2, f = -3, g = -2, h = 3.2, //
        i = 3.1, j = -1, k = 2, l = 1.15, //
        m = 1, n = 2, o = 3.14, p = 1.4;
    final Matrix4 mat4A = new Matrix4( //
        a, b, c, d, //
        e, f, g, h, //
        i, j, k, l, //
        m, n, o, p);
    // prepare sections
    final double m00 = new Matrix3(f, g, h, j, k, l, n, o, p).determinant();
    final double m01 = new Matrix3(e, g, h, i, k, l, m, o, p).determinant();
    final double m02 = new Matrix3(e, f, h, i, j, l, m, n, p).determinant();
    final double m03 = new Matrix3(e, f, g, i, j, k, m, n, o).determinant();
    final double determinant = a * m00 - b * m01 + c * m02 - d * m03;
    assertTrue(Math.abs(determinant - mat4A.determinant()) <= MathUtils.EPSILON);
  }
}