Matrix3x2 Invert produces an incorrect result because each next element is computed from the previously modified elements, not the original one.
As a solution, you can create a new matrix instead of mutating the original one or use temporary variables.
Also, Matrix3x2 contains a division operator that simply divides each element of one matrix by an element of the other, which makes no practical sense, better to replace it with a multiplication by an inverted matrix, so A * B / B = A
Matrix3x2 Invert produces an incorrect result because each next element is computed from the previously modified elements, not the original one.
As a solution, you can create a new matrix instead of mutating the original one or use temporary variables.
Also, Matrix3x2 contains a division operator that simply divides each element of one matrix by an element of the other, which makes no practical sense, better to replace it with a multiplication by an inverted matrix, so A * B / B = A