Math 数值对象

1.弧度的π   Math.PI

2.返回平方根  Math.sqrt(16)

3.Math.abs(x) 返回的绝对值

4.Math.ceil(x) 返回x的上舍入

5.Math.floor(x) 返回x的下舍入

6.Math.max(a,b,c,d)返回a,b,c,d中的最大值 a,b,c,d必须是数字

7.Math.min(a,b,c,d)返回a,b,c,d中的最小值 a,b,c,d必须是数字

8.Math.random()返回0-1之间的随机数

9.Math.round(x) 返回对x四舍五入后的数值

10.Math.sin(x) 返回x的正弦值  对边比斜边

11.Math.cos(x) 返回x的余弦值  邻边/斜边

12.Math.tan(x) 返回x的正切值  对边/邻边

13.Math.asin(x)

14.Math.acos()

15 math.atan()

……  

详情搜索   http://www.runoob.com/jsref/jsref-obj-math.html

 

原文地址:https://www.cnblogs.com/yangzhiqiang/p/10154261.html