📅  最后修改于: 2022-03-11 15:02:53.448000             🧑  作者: Mango
Use Math.round(num * 100) / 100
Edit: to ensure things like 1.005 round correctly, we use
Math.round((num + Number.EPSILON) * 100) / 100