|
|
|
@ -857,10 +857,9 @@ bool CObjectNumber::equal(const CObject* other) const
|
|
|
|
|
if (!other || !other->isNumber()) return false;
|
|
|
|
|
double otherValue = other->toNumber();
|
|
|
|
|
if (_Value == otherValue) return true;
|
|
|
|
|
/*
|
|
|
|
|
TODO: fabs + epsilon trick
|
|
|
|
|
*/
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
// if difference between 2 values less than epsilon, we consider they are equals
|
|
|
|
|
return fabs(_Value - otherValue) <= std::numeric_limits<double>::epsilon();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|