我需要将浮点值四舍五入为最接近的整数,例如 value 是
2.4 = 2
如果我的价值是
2.5 = 3
我使用 round()、floor() 和 toFixed() 但它只做了向上、向下、相等的数字。
慕少森
相关分类