最佳答案
例如,我需要舍入6.688689到6.7,但它总是显示我7。
我的方法:
Math.round(6.688689);
//or
Math.round(6.688689, 1);
//or
Math.round(6.688689, 2);
但是结果总是相同的7…我做错了什么?