Use a larger data type for min_dist
Squared norms are massive and can logically exceed 32-bit ints
This commit is contained in:
parent
238356ec61
commit
675938375b
|
@ -478,7 +478,7 @@ private:
|
|||
|
||||
// first look for points in increasing z-order
|
||||
Vertex* p = aPt->nextZ;
|
||||
long min_dist = std::numeric_limits<long>::max();
|
||||
int64_t min_dist = std::numeric_limits<int64_t>::max();
|
||||
Vertex* retval = nullptr;
|
||||
|
||||
while( p && p->z <= maxZ )
|
||||
|
|
Loading…
Reference in New Issue