1.向上取整Math.ceil(2.4)// 输出3
2.四舍五入// 输出2Math.round(2.499)
// 输出3
Math.round(2.6)
3.向下取整
// 输出2Math.floor(2.9)参考链接:https://blog.csdn.net/gongxiaoyi9511/article/details/108771245