Matrix { public float getDeterminant(){ return vals[I11] * vals[I22] * vals[I33] + vals[I12] * vals[I23] * vals[I31] + vals[I13] * vals[I21] * vals[I32] - vals[I11] * vals[I23] * vals[I32] - vals[I12] * vals[I21] * vals[I33] - vals[I13] * vals[I22] * vals[I31]; } Matrix();  Matrix(float tx, float ty);  Matrix(float a, float b, float c, float d, float e, float f); float get(int index); Matrix multiply(Matrix by); Matrix subtract(Matrix arg); float getDeterminant(); boolean equals(Object obj); int hashCode(); String toString(); static final int I11; static final int I12; static final int I13; static final int I21; static final int I22; static final int I23; static final int I31; static final int I32; static final int I33; }
@Test public void testDeterminant(){ Matrix m = new Matrix(2, 3, 4, 5, 6, 7); Assert.assertEquals(-2f, m.getDeterminant(), .001f); }