From a4a6ea2825303cdd917071b8f9e80a30ad8061aa Mon Sep 17 00:00:00 2001 From: Vincent Aymong Date: Thu, 6 Jul 2017 19:17:55 -0400 Subject: [PATCH] std::abs instead of just abs. Fixes compilation issues with gcc. --- test/gtx/gtx_matrix_factorisation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/gtx/gtx_matrix_factorisation.cpp b/test/gtx/gtx_matrix_factorisation.cpp index 573f3d0a..7d32078f 100644 --- a/test/gtx/gtx_matrix_factorisation.cpp +++ b/test/gtx/gtx_matrix_factorisation.cpp @@ -16,7 +16,7 @@ int test_qr(matType m) { for (glm::length_t i = 0; i < C; i++) { for (glm::length_t j = 0; j < R; j++) { - if (abs(err[i][j]) > epsilon) return 1; + if (std::abs(err[i][j]) > epsilon) return 1; } } @@ -25,7 +25,7 @@ int test_qr(matType m) { if ((length(q[i]) - 1) > epsilon) return 2; for (glm::length_t j = 0; j epsilon) return 3; + if (std::abs(dot(q[i], q[j])) > epsilon) return 3; } } @@ -52,7 +52,7 @@ int test_rq(matType m) { for (glm::length_t i = 0; i < C; i++) { for (glm::length_t j = 0; j < R; j++) { - if (abs(err[i][j]) > epsilon) return 1; + if (std::abs(err[i][j]) > epsilon) return 1; } } @@ -64,7 +64,7 @@ int test_rq(matType m) { if ((length(tq[i]) - 1) > epsilon) return 2; for (glm::length_t j = 0; j epsilon) return 3; + if (std::abs(dot(tq[i], tq[j])) > epsilon) return 3; } }