产生闭区间内的随机整数

//求 [a,b]之间的随机整数
Math.floor(Math.random()*(b-a+1)+a)

posted on 2014-11-02 17:55  狂奔的冬瓜  阅读(138)  评论(0)    收藏  举报