Modify the epsilon parameter of the approxEqual() method
This commit is contained in:
parent
bd0561acd9
commit
8107bbab8e
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user