Add assert messages for all assertions up until ol.renderer.vector.

This commit is contained in:
Bart van den Eijnden
2015-03-30 16:41:32 +02:00
parent fb9ba22c30
commit 47ce127a10
74 changed files with 1173 additions and 682 deletions

View File

@@ -36,7 +36,7 @@ ol.math.csch = function(x) {
* @return {number} The smallest power of two greater than or equal to x.
*/
ol.math.roundUpToPowerOfTwo = function(x) {
goog.asserts.assert(0 < x);
goog.asserts.assert(0 < x, 'x should be larger than 0');
return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));
};