Hello!
There is the following code and a very strange result which returns the function of invert. How does the invert function actually work for zero determinant matrices?
matrix3 matA = { {1,2,3}, {4,5,6}, {7,8,9} };
// Find the determinant of the matrix
// If the determinant value is zero, then an inverted matrix cannot be found for such a matrix.
int det = determinant(matA); // det == 0
matrix3 matB = invert(matA); // { {-0.75, 0.5, 0.25}, {-0.5, 0, -0.5}, {0.5833, 0.5, -0.083} }