Math内置对象 常用的方法
属性: Math.Pi
方法: Math.max() 最大值
Math.min() 最小值
Math.ceil() 向上取整
Math.floor() 向下取整
Math.random() 取随机数
Math.abs() 绝对值
Math.pow() 幂
Math.sqrt() 平方
重点 随机数的用法
function getRandom(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }

浙公网安备 33010602011771号