Math对象定义的函数:
Math.pow(2,10) //2的10次幂
Math.round(0.7) //四舍五入
Math.ceil(0.7) // => 1.0 向上求整
Math.floor(0.7) // => 0.0 向下求整
Math.abs(-5) //求绝对值
Math.max(x, y, z) //返回最大值
Math.min(x, y, z) //返回最小值
Math.random() //生成一个大于等于0,小于1.0的伪随机数
Math.PI // 远走率:π
Math.E //自然对数的底数:e
Math.sqrt(3) //3的平方根
Math.pow(3, 1/3) //3的立方根
Math.sin(0) //三角函数
Math.cos(0) //三角函数
Math.log(10) //10的自然对数
Math.log(100)/Math.LN10 //以10为底100的对数
Math.exp(3) //e的3次幂