Skip to content

Commit

Permalink
std::abs instead of just abs. Fixes compilation issues with gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
unordinateur committed Jul 6, 2017
1 parent da47fac commit a4a6ea2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/gtx/gtx_matrix_factorisation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int test_qr(matType<C, R, T, P> 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;
}
}

Expand All @@ -25,7 +25,7 @@ int test_qr(matType<C, R, T, P> m) {
if ((length(q[i]) - 1) > epsilon) return 2;

for (glm::length_t j = 0; j<i; j++) {
if (abs(dot(q[i], q[j])) > epsilon) return 3;
if (std::abs(dot(q[i], q[j])) > epsilon) return 3;
}
}

Expand All @@ -52,7 +52,7 @@ int test_rq(matType<C, R, T, P> 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;
}
}

Expand All @@ -64,7 +64,7 @@ int test_rq(matType<C, R, T, P> m) {
if ((length(tq[i]) - 1) > epsilon) return 2;

for (glm::length_t j = 0; j<i; j++) {
if (abs(dot(tq[i], tq[j])) > epsilon) return 3;
if (std::abs(dot(tq[i], tq[j])) > epsilon) return 3;
}
}

Expand Down

0 comments on commit a4a6ea2

Please sign in to comment.