// 四舍五入
Math.round(3/2)
2
// 向上取整
Math.ceil(3/2)
2
// 向下取整
Math.floor(3/2)
1
// 取余
7%4
3
js数学计算相关四舍五入、向上取整、向下取整、取余
猜你喜欢
转载自blog.csdn.net/mouday/article/details/105654042
今日推荐
周排行