Replace Vector3D ==/!= with difference < Precision::Confusion()

This commit is contained in:
WandererFan
2017-01-19 11:52:16 -05:00
committed by Yorik van Havre
parent 8d8dec9f3d
commit 5874a83409
2 changed files with 7 additions and 4 deletions

View File

@@ -281,7 +281,7 @@ std::string DrawUtil::formatVector(const Base::Vector3d& v)
bool DrawUtil::vectorLess(const Base::Vector3d& v1, const Base::Vector3d& v2)
{
bool result = false;
if (v1 != v2) {
if ((v1 - v2).Length() > Precision::Confusion()) { //ie v1 != v2
if (!DrawUtil::fpCompare(v1.x,v2.x)) {
result = v1.x < v2.x;
} else if (!DrawUtil::fpCompare(v1.y,v2.y)) {