📜  删除浮点 javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:01.304000             🧑  作者: Mango

代码示例1
Math.floor(5.9) // 5 rounds down
Math.ceil(5.1) // 6 rounds up
Math.round(5.5) // 6 round to nearest integer
Math.trunc(5.1) // 5 removes fractional part