diff --git a/src/ol/extent.js b/src/ol/extent.js index 1cf9d361a7..1011e84acc 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -46,9 +46,7 @@ ol.Extent.boundingExtent = function(var_args) { * @return {ol.Extent} Empty extent. */ ol.Extent.createEmptyExtent = function() { - return new ol.Extent( - Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, - Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY); + return new ol.Extent(Infinity, Infinity, -Infinity, -Infinity); }; diff --git a/src/ol/math.js b/src/ol/math.js index b07da1f04a..8a1d41a965 100644 --- a/src/ol/math.js +++ b/src/ol/math.js @@ -35,7 +35,7 @@ ol.math.csch = function(x) { */ ol.math.roundUpToPowerOfTwo = function(x) { goog.asserts.assert(0 < x); - return Math.pow(2, Math.ceil(Math.log(x) / Math.log(2))); + return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2)); };