1.Math.random()dom 返回0~1之间的随机数,可能为0,但老是小于1,[0,1)随机数
1.Math.random()dom
返回0~1之间的随机数,可能为0,但老是小于1,[0,1)随机数
2.Math.ceil()block 对一个数进行向上取整
2.Math.ceil()block
对一个数进行向上取整
3.Math.floor() 对一个数进行向下取整
3.Math.floor()
对一个数进行向下取整
4.Math.round() 对一个数进行四舍五入后取整
4.Math.round()
对一个数进行四舍五入后取整