diff options
author | c.lamboo <casperlamboo@gmail.com> | 2022-10-24 14:28:22 +0300 |
---|---|---|
committer | c.lamboo <casperlamboo@gmail.com> | 2022-10-24 14:28:22 +0300 |
commit | 939f2a36ef7bb41196f76eba9efdd273d19f1cfb (patch) | |
tree | 20547f7105ac21d4a7247d3750fd3494fd96bf76 | |
parent | 4179bd4a08b5ab69ddd438959c04eac79d49c20d (diff) |
Revert "Rename variables"
This reverts commit 4179bd4a08b5ab69ddd438959c04eac79d49c20d.
-rw-r--r-- | include/PathOrderOptimizer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/PathOrderOptimizer.h b/include/PathOrderOptimizer.h index 0e1319976..d57b7ef99 100644 --- a/include/PathOrderOptimizer.h +++ b/include/PathOrderOptimizer.h @@ -530,14 +530,14 @@ protected: // Which point in the real deal is closest to the simple polygon version? size_t best_index = 0; - coord_t closest_dist = std::numeric_limits<coord_t>::max(); + coord_t closest_dist2 = std::numeric_limits<coord_t>::max(); for (size_t i = 0; i < path.converted->size(); ++i) { const Point& here = (*path.converted)[i]; - const coord_t here_dist = vSize2(best_point - here); - if (here_dist < closest_dist) + const coord_t dist2 = vSize2(best_point - here); + if (dist2 < closest_dist2) { - closest_dist = here_dist; + closest_dist2 = dist2; best_index = i; } } |