但如果你想要四捨五入到小數位數,可以用這樣的技巧:. 小數點兩位. Math.round(x * 100) / 100 // 1.53 Math.round(1.5268 * 100) / 100. 小數點三位
確定! 回上一頁