Note that PROC_invert is suitable only for 3x3 matrices or larger. To invert a 2x2 matrix M() use:
Code: Select all
M() = M(1,1),-M(0,1), -M(1,0),M(0,0)
M() /= M(0,0)*M(1,1) - M(0,1)*M(1,0)
Code: Select all
M() = M(1,1),-M(0,1), -M(1,0),M(0,0)
M() /= M(0,0)*M(1,1) - M(0,1)*M(1,0)