Skip to content

Commit

Permalink
Fix MaximumInscribedCircle::computeMaximumIterations for small values (
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtoews authored Jul 27, 2024
1 parent 4907d59 commit b17470d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/algorithm/construct/MaximumInscribedCircle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ MaximumInscribedCircle::computeMaximumIterations(const Geometry* geom, double to
double diam = geom->getEnvelopeInternal()->getDiameter();
double ncells = diam / toleranceDist;
//-- Using log of ncells allows control over number of iterations
std::size_t factor = (std::size_t) std::log(ncells);
int factor = (int) std::log(ncells);
if (factor < 1) factor = 1;
return 2000 + 2000 * factor;
return (std::size_t) (2000 + 2000 * factor);
}

/* public */
Expand Down

0 comments on commit b17470d

Please sign in to comment.