From c78db67cbab5d60469afc797fa3602d407006738 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 16 May 2014 11:46:07 -0700 Subject: [PATCH] Round negative drawing coordinates correctly --- src/resolution_resampler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resolution_resampler.cpp b/src/resolution_resampler.cpp index c2882ac4a..db097d077 100644 --- a/src/resolution_resampler.cpp +++ b/src/resolution_resampler.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include enum { @@ -50,7 +51,7 @@ namespace { val = (val + shift_x) * scale_x; else val = (val + shift_y) * scale_y; - val = int(val * 8 + .5) / 8.0; // round to eighth-pixels + val = round(val * 8) / 8.0; // round to eighth-pixels final += float_to_string(val); final += ' '; is_x = !is_x;