Use more compact constants

This commit is contained in:
Tom Payne
2013-03-22 11:14:07 +01:00
parent 69370ce629
commit 72437ff57b
2 changed files with 2 additions and 4 deletions

View File

@@ -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);
};

View File

@@ -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));
};