From 0c13d007354c0b8ecf4b14b2c51ffe04157d12f8 Mon Sep 17 00:00:00 2001 From: truelight Date: Sat, 26 May 2007 15:20:13 +0000 Subject: (svn r9936) -Fix: (Un)ScaleByZoom missed a minus sign in some cases --- src/zoom.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zoom.hpp b/src/zoom.hpp index e5e119452..c80f094bf 100644 --- a/src/zoom.hpp +++ b/src/zoom.hpp @@ -37,14 +37,14 @@ static inline int ScaleByZoom(int value, ZoomLevel zoom) { if (zoom == ZOOM_LVL_NORMAL) return value; int izoom = (int)zoom - (int)ZOOM_LVL_NORMAL; - return (zoom > ZOOM_LVL_NORMAL) ? value << izoom : value >> izoom; + return (zoom > ZOOM_LVL_NORMAL) ? value << izoom : value >> -izoom; } static inline int UnScaleByZoom(int value, ZoomLevel zoom) { if (zoom == ZOOM_LVL_NORMAL) return value; int izoom = (int)zoom - (int)ZOOM_LVL_NORMAL; - return (zoom > ZOOM_LVL_NORMAL) ? value >> izoom : value << izoom; + return (zoom > ZOOM_LVL_NORMAL) ? value >> izoom : value << -izoom; } #endif /* ZOOM_HPP */ -- cgit v1.2.3-70-g09d2