From 4837316f9b967d6a229ee9c4edc0f2daaa028ffd Mon Sep 17 00:00:00 2001 From: Julian Kent Date: Fri, 22 Jan 2021 17:21:49 +0100 Subject: [PATCH] Fix small inconsistencies and compiler warnings --- matrix/SquareMatrix.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix/SquareMatrix.hpp b/matrix/SquareMatrix.hpp index 827eb497b0..9cb02cddfb 100644 --- a/matrix/SquareMatrix.hpp +++ b/matrix/SquareMatrix.hpp @@ -319,12 +319,12 @@ bool inv(const SquareMatrix & A, SquareMatrix & inv, size_t ra for (size_t n = 0; n < rank; n++) { // if diagonal is zero, swap with row below - if (fabs(static_cast(U(n, n))) < FLT_EPSILON) { + if (fabs(U(n, n)) < Type(FLT_EPSILON)) { //printf("trying pivot for row %d\n",n); for (size_t i = n + 1; i < rank; i++) { //printf("\ttrying row %d\n",i); - if (fabs(static_cast(U(i, n))) > Type(1e-8f)) { + if (fabs(U(i, n)) > Type(FLT_EPSILON)) { //printf("swapped %d\n",i); U.swapRows(i, n); P.swapRows(i, n);