minor regularization of vectors and matrices

This commit is contained in:
Mathew Sutcliffe
2013-08-19 17:44:33 +01:00
parent f9f35f27d5
commit 5f267e8245
9 changed files with 72 additions and 177 deletions

View File

@@ -30,8 +30,8 @@ double CMatrix3x3::determinant() const
CMatrix3x3 CMatrix3x3::inverse(bool &o_invertible) const
{
CMatrix3x3 inverse;
double det;
if (this->allValuesEqual() || (det = this->determinant()) == 0)
double det = this->determinant();
if (det == 0)
{
o_invertible = false;
inverse.setZero();