value_between now puts small map in the center, or at least should
authornireco
Mon, 08 Dec 2008 21:54:04 +0000
changeset 316 d909a7e36f8d
parent 315 fe9da2d5355e
child 317 f325fad21f4f
value_between now puts small map in the center, or at least should
src/Graphics.cc
--- a/src/Graphics.cc	Mon Dec 08 21:49:54 2008 +0000
+++ b/src/Graphics.cc	Mon Dec 08 21:54:04 2008 +0000
@@ -52,7 +52,10 @@
 }
 
 static PixelDimension value_between (PixelDimension low, PixelDimension value, PixelDimension high) {
-    if (value < low)
+    if (high < low)
+        return (high + low) / 2;
+
+    else if (value < low)
         return low;
 
     else if (value > high)