Replace Vector3D ==/!= with difference < Precision::Confusion()
This commit is contained in:
committed by
Yorik van Havre
parent
8d8dec9f3d
commit
5874a83409
@@ -479,7 +479,7 @@ std::string edgeSortItem::dump(void)
|
||||
/*static*/bool edgeSortItem::edgeLess(const edgeSortItem& e1, const edgeSortItem& e2)
|
||||
{
|
||||
bool result = false;
|
||||
if (e1.start != e2.start) {
|
||||
if ((e1.start - e2.start).Length() < Precision::Confusion()) {
|
||||
if ( DrawUtil::vectorLess(e1.start, e2.start)) {
|
||||
result = true;
|
||||
}
|
||||
@@ -501,8 +501,11 @@ std::string edgeSortItem::dump(void)
|
||||
/*static*/bool edgeSortItem::edgeEqual(const edgeSortItem& e1, const edgeSortItem& e2)
|
||||
{
|
||||
bool result = false;
|
||||
if ( (e1.start == e2.start) &&
|
||||
(e1.end == e2.end) &&
|
||||
double startDif = (e1.start - e2.start).Length();
|
||||
double endDif = (e1.end - e2.end).Length();
|
||||
|
||||
if ( (startDif < Precision::Confusion()) &&
|
||||
(endDif < Precision::Confusion()) &&
|
||||
(DrawUtil::fpCompare(e1.startAngle,e2.startAngle)) &&
|
||||
(DrawUtil::fpCompare(e1.endAngle,e2.endAngle)) ) {
|
||||
result = true;
|
||||
|
||||
Reference in New Issue
Block a user