JS Math常用方法

Math

  1.Math.abs() 获取绝对值;
  2.Math.round() 四舍五入;
  3.Math.random()  0~1随机小数;
  4.Math.ceil() Math.floor() 向上取整和向下取整;
  5.Math.max() Math.min()  最大最小值;
  6.Math.PI   圆周率;
  7.Math.pow(a,b)  a的b次幂  Math.aqrt(a)  a开方
原文地址:https://www.cnblogs.com/-swz/p/14178571.html