javascript Math对象
1.取绝对值
• Math.abs();
2.取近似整数
• Math.round() 四舍五入
• Math.floor() 对数进行向下取舍
• Math.ceil() 对数进行向上取舍
3.取随机数
• Math.random();
• 取x到y之间的随机数:Math.random()*(y-x)+x;
javascript Math对象
1.取绝对值
• Math.abs();
2.取近似整数
• Math.round() 四舍五入
• Math.floor() 对数进行向下取舍
• Math.ceil() 对数进行向上取舍
3.取随机数
• Math.random();
• 取x到y之间的随机数:Math.random()*(y-x)+x;