For 1x1 matrices we really need to check the abs diff of the determinants.

This commit is contained in:
Hauke Heibel 2010-06-11 08:08:12 +02:00
parent cedea2aba4
commit f48af91c7e

View File

@ -78,7 +78,7 @@ template<typename MatrixType> void inverse(const MatrixType& m)
MatrixType m3 = v3*v3.transpose(), m4(rows,cols);
m3.computeInverseAndDetWithCheck(m4, det, invertible);
VERIFY( rows==1 ? invertible : !invertible );
VERIFY_IS_MUCH_SMALLER_THAN(m3.determinant(), RealScalar(1));
VERIFY_IS_MUCH_SMALLER_THAN(ei_abs(det-m3.determinant()), RealScalar(1));
m3.computeInverseWithCheck(m4, invertible);
VERIFY( rows==1 ? invertible : !invertible );
#endif