From b29a87653d26fbb8fa5527cf35f46e695b3c8ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 3 Mar 2011 12:46:31 +0000 Subject: [PATCH] Replace % 2 with & 1 (modulo 2). --- src/item/Raster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/Raster.js b/src/item/Raster.js index eda355b6..e36a28b4 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -172,7 +172,7 @@ Raster = Item.extend({ // Start with the first coordinate pair for both (coords.slice(0, 2)). var min = coords.slice(0, 2), max = min.slice(0); for (var i = 2; i < 8; i++) { - var c = coords[i], j = i % 2; + var c = coords[i], j = i & 1; // i & 1 == i % 2 == i modulo 2 if (c < min[j]) min[j] = c; else if (c > max[j])