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); }