From bffbd66c546a722190d598d406b71d46d2bf344a Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Sat, 2 Apr 2016 02:26:20 +0200 Subject: [PATCH] Fix precision issue in unit tests --- .../mathematics/TestMathematicsFunctions.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/tests/mathematics/TestMathematicsFunctions.h b/test/tests/mathematics/TestMathematicsFunctions.h index 726eca05..f7cb56e5 100644 --- a/test/tests/mathematics/TestMathematicsFunctions.h +++ b/test/tests/mathematics/TestMathematicsFunctions.h @@ -109,17 +109,17 @@ class TestMathematicsFunctions : public Test { Vector3 c(0, 0, 5); decimal u,v,w; computeBarycentricCoordinatesInTriangle(a, b, c, a, u, v, w); - test(approxEqual(u, 1.0, 0.000001)); - test(approxEqual(v, 0.0, 0.000001)); - test(approxEqual(w, 0.0, 0.000001)); + test(approxEqual(u, 1.0, 0.0001)); + test(approxEqual(v, 0.0, 0.0001)); + test(approxEqual(w, 0.0, 0.0001)); computeBarycentricCoordinatesInTriangle(a, b, c, b, u, v, w); - test(approxEqual(u, 0.0, 0.000001)); - test(approxEqual(v, 1.0, 0.000001)); - test(approxEqual(w, 0.0, 0.000001)); + test(approxEqual(u, 0.0, 0.0001)); + test(approxEqual(v, 1.0, 0.0001)); + test(approxEqual(w, 0.0, 0.0001)); computeBarycentricCoordinatesInTriangle(a, b, c, c, u, v, w); - test(approxEqual(u, 0.0, 0.000001)); - test(approxEqual(v, 0.0, 0.000001)); - test(approxEqual(w, 1.0, 0.000001)); + test(approxEqual(u, 0.0, 0.0001)); + test(approxEqual(v, 0.0, 0.0001)); + test(approxEqual(w, 1.0, 0.0001)); } };