merging lifesinger's clarified range.

This commit is contained in:
Jeremy Ashkenas
2011-01-18 15:48:13 -05:00
parent 6c2693a5ea
commit 49787c212d

View File

@@ -389,9 +389,9 @@
}
step = arguments[2] || 1;
var range = [];
var len = Math.max(Math.ceil((stop - start) / step), 0);
var idx = 0;
var range = new Array(len);
while(idx < len) {
range[idx++] = start;