From 72437ff57b048a286d3aab4a3b1a943cf37a3afa Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Fri, 22 Mar 2013 11:14:07 +0100 Subject: [PATCH] Use more compact constants --- src/ol/extent.js | 4 +--- src/ol/math.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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)); };