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

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