Javascript Math range(a, b)
/*// www. jav a 2 s . co m * @Range * * add range method for math * */ Math.range = function (a, b) { return this.floor(this.random() * a) + b; };