mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Changed: Implement a TODO
--HG-- branch : develop
This commit is contained in:
parent
a9af8f4efe
commit
45597ebd8a
1 changed files with 4 additions and 5 deletions
|
@ -857,10 +857,9 @@ bool CObjectNumber::equal(const CObject* other) const
|
||||||
if (!other || !other->isNumber()) return false;
|
if (!other || !other->isNumber()) return false;
|
||||||
double otherValue = other->toNumber();
|
double otherValue = other->toNumber();
|
||||||
if (_Value == otherValue) return true;
|
if (_Value == otherValue) return true;
|
||||||
/*
|
|
||||||
TODO: fabs + epsilon trick
|
// if difference between 2 values less than epsilon, we consider they are equals
|
||||||
*/
|
return fabs(_Value - otherValue) <= std::numeric_limits<double>::epsilon();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue