Skip to content

Commit

Permalink
+ fixes #1418: Base::Matrix4d can't invert rotoinversion
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Feb 17, 2014
1 parent 81cbd26 commit efdbe46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Base/MatrixPyImp.cpp
Expand Up @@ -341,7 +341,7 @@ PyObject* MatrixPy::invert(PyObject * args)
return NULL;

PY_TRY {
if (getMatrixPtr()->determinant() > DBL_EPSILON)
if (fabs(getMatrixPtr()->determinant()) > DBL_EPSILON)
getMatrixPtr()->inverseGauss();
else {
PyErr_SetString(PyExc_Exception, "Cannot invert singular matrix");
Expand All @@ -359,7 +359,7 @@ PyObject* MatrixPy::inverse(PyObject * args)
return NULL;

PY_TRY {
if (getMatrixPtr()->determinant() > DBL_EPSILON) {
if (fabs(getMatrixPtr()->determinant()) > DBL_EPSILON) {
Base::Matrix4D m = *getMatrixPtr();
m.inverseGauss();
return new MatrixPy(m);
Expand Down

0 comments on commit efdbe46

Please sign in to comment.