mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-03 18:24:02 +08:00
For 1x1 matrices we really need to check the abs diff of the determinants.
This commit is contained in:
parent
cedea2aba4
commit
f48af91c7e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user