1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Math.pow(2,53) //2的53次幂
Math.round(.6) //1 四舍五入
Math.ceil(.5) //1 向上取整
Math.floor(.6) //0 向下取整
Math.abs(-5) //5 绝对值
Math.max(x,y,z) // 最大值
Math.min(x,y,z) //最小值
Math.random() // 生成一个0-1的随机数
Math.PI // 圆周率
Math.E //自然对数的底数
Math.sqrt(3)//三的平方根
Math.pow(3)//3的立方根
Math.sin(o)三角函数,还有Math.cos,Math.atan等
Math.log(10)//10的自然对数
Math.log(100)/Math.LN10 //以10为底的100的对数
Math.log(512)/Math.LN2 //以2为底的512对数
Math.exp(3) // e的三次幂