Use a larger data type for min_dist

Squared norms are massive and can logically exceed 32-bit ints
This commit is contained in:
Marek Roszko 2022-08-18 22:19:36 -04:00
parent 238356ec61
commit 675938375b
1 changed files with 1 additions and 1 deletions

View File

@ -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 )