获取圆周率

Math.PI;

获取最大值

Math.max(1,2,3,4);  

获取最小值

Math(min(1,2,3,4);

四舍五入

Math.round(2.5);

向上取整

Math.ceil(1.1);

向下取整

Math.floor(2.9); 

获取0~1之间的随机数,不包括0和1

Math.random();

相关文章: