Skip to content

Commit

Permalink
use ::hypot from libc instead of the STL version
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaefer committed Sep 5, 2018
1 parent 1b78d42 commit e172e9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/mapbox/geojsonvt/clip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class clipper {
const double ak = get<I>(a);
const double bk = get<I>(b);

if (lineMetrics) segLen = std::hypot((b.x - a.x), (b.y - a.y));
if (lineMetrics) segLen = ::hypot((b.x - a.x), (b.y - a.y));

if (ak < k1) {
if (bk > k2) { // ---|-----|-->
Expand Down
2 changes: 1 addition & 1 deletion include/mapbox/geojsonvt/convert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct project {
for (size_t i = 0; i < len - 1; ++i) {
const auto& a = result[i];
const auto& b = result[i + 1];
result.dist += std::hypot((b.x - a.x), (b.y - a.y));
result.dist += ::hypot((b.x - a.x), (b.y - a.y));
}

simplify(result, tolerance);
Expand Down

0 comments on commit e172e9c

Please sign in to comment.