一、Math.round()
Math.round(x) 的返回值是 x 四舍五入为最接近的整数。
二、Math.pow()
Math.pow(x, y) 的返回值是 x 的 y 次幂。
三、Math.sqrt()
Math.sqrt(x) 返回 x 的平方根。
四、Math.abs()
Math.abs(x) 返回 x 的绝对(正)值。
五、Math.ceil()
Math.ceil(x) 的返回值是 x 上舍入最接近的整数。
六、Math.floor()
Math.floor(x) 的返回值是 x 下舍入最接近的整数。
七、Math.sin()
Math.sin(x) 返回角 x(以弧度计)的正弦(介于 -1 与 1 之间的值)。
八、Math.cos()
Math.cos(x) 返回角 x(以弧度计)的余弦(介于 -1 与 1 之间的值)。
九、Math.min() 和 Math.max()
Math.min() 和 Math.max() 可用于查找参数列表中的最低或最高值。
十、Math.random()
Math.random() 返回介于 0(包括) 与 1(不包括) 之间的随机数。
十一、JavaScript 随机整数
Math.random() 与 Math.floor() 一起使用用于返回随机整数。