// Helpful print functions void print_matrix(Matrix33 const &_matrix) { DebugLogPrint("MATRIX:\n"); for (int i = 0; i < 3; ++i) { DebugLogPrint("ROW%d:", i); for (int j = 0; j < 3; ++j) { DebugLogPrint(" %f ", _matrix.values[i][j]); } DebugLogPrint("\n"); } DebugLogPrint("DETERMINANT: %f\n", _matrix.Determinant()); }
float InertiaMatrix::Adjoint( int skip_r, int skip_c ) const { Matrix33 sub = Submatrix( skip_r, skip_c ); return pow(-1.0f, float(skip_r + skip_c)) * sub.Determinant(); }