产生闭区间内的随机整数

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

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