Skip to content

Commit 51f09d0

Browse files
tmpsantosmourner
authored andcommitted
std::round is not defined in some platforms (#30)
Use the C version.
1 parent a5ac5b3 commit 51f09d0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/mapbox/polylabel.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ geometry::point<T> polylabel(const geometry::polygon<T>& polygon, T precision =
152152
// update the best cell if we found a better one
153153
if (cell.d > bestCell.d) {
154154
bestCell = cell;
155-
if (debug) std::cout << "found best " << std::round(1e4 * cell.d) / 1e4 << " after " << numProbes << " probes" << std::endl;
155+
if (debug) std::cout << "found best " << ::round(1e4 * cell.d) / 1e4 << " after " << numProbes << " probes" << std::endl;
156156
}
157157

158158
// do not drill down further if there's no chance of a better solution
@@ -175,4 +175,4 @@ geometry::point<T> polylabel(const geometry::polygon<T>& polygon, T precision =
175175
return bestCell.c;
176176
}
177177

178-
} // namespace mapbox
178+
} // namespace mapbox

0 commit comments

Comments
 (0)