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

This commit is contained in:
WandererFan
2017-01-20 00:09:38 -02:00
committed by Yorik van Havre
parent e9b5722220
commit 306ad7fcee
2 changed files with 7 additions and 4 deletions
+1 -1
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)) {