📅  最后修改于: 2022-03-11 15:03:51.193000             🧑  作者: Mango
Math.round(num * 100) / 100
//OR to be more specific and to ensure things like 1.005 round correctly, use Number.EPSILON :
Math.round((num + Number.EPSILON) * 100) / 100