From 8107bbab8eb9c2384b52f9689ea7cbac590483bb Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Sat, 9 Mar 2013 08:37:40 +0100 Subject: [PATCH] Modify the epsilon parameter of the approxEqual() method --- src/mathematics/mathematics_functions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mathematics/mathematics_functions.h b/src/mathematics/mathematics_functions.h index 5557d0e3..9c95cbf8 100644 --- a/src/mathematics/mathematics_functions.h +++ b/src/mathematics/mathematics_functions.h @@ -37,7 +37,7 @@ namespace reactphysics3d { // function to test if two real numbers are (almost) equal // We test if two numbers a and b are such that (a-b) are in [-EPSILON; EPSILON] -inline bool approxEqual(decimal a, decimal b, decimal epsilon = 1.0e-10) { +inline bool approxEqual(decimal a, decimal b, decimal epsilon = MACHINE_EPSILON) { decimal difference = a - b; return (difference < epsilon && difference > -epsilon); }