阅读背景:

使用Math.floor与Math.random取随机整数的方法详解

来源:互联网 

!--NEWSZW_HZH_BEGIN--

Math.random():获得0~1随机数

Math.floor() method rounds a number DOWNWARDS to the nearest integer, and returns the result. (小于等于 x,且与 x 最接近的整数。)Math.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: