Use shifts rather than floor

This commit is contained in:
Tom Payne
2013-01-19 18:35:24 +01:00
parent 11938d2264
commit 3383c426b3

View File

@@ -48,8 +48,8 @@ ol.tilegrid.XYZ.prototype.forEachTileCoordParentTileRange =
if (z < 0) { if (z < 0) {
break; break;
} }
x = Math.floor(x / 2); x >>= 1;
y = Math.floor(y / 2); y >>= 1;
tileRange = new ol.TileRange(x, y, x, y); tileRange = new ol.TileRange(x, y, x, y);
if (callback.call(opt_obj, z, tileRange)) { if (callback.call(opt_obj, z, tileRange)) {
break; break;