From 3ef93f8684c762e141c40d82e45b0f19f32608f1 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 17 Jan 2013 13:00:54 -0800 Subject: [PATCH] fix incorrect float rounding - closes #1693 - refs #1694 --- include/mapnik/markers_placement.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mapnik/markers_placement.hpp b/include/mapnik/markers_placement.hpp index dd5019629..452e6b5b8 100644 --- a/include/mapnik/markers_placement.hpp +++ b/include/mapnik/markers_placement.hpp @@ -155,7 +155,7 @@ public: set_spacing_left(marker_width_/2); //Only moves forward } //Error for this marker is too large. Skip to the next position. - if (abs(error_) > max_err_allowed) + if (std::abs(error_) > max_err_allowed) { if (error_ > spacing_) { @@ -216,7 +216,7 @@ public: } continue; //Force checking of max_error constraint } - angle = atan2(dy, dx); + angle = std::atan2(dy, dx); x = last_x + dx * (spacing_left_ / segment_length); y = last_y + dy * (spacing_left_ / segment_length); box2d box = perform_transform(angle, x, y);