Open EdwardZZZ opened 6 years ago
1.向下取整
parseInt(1.5555) 0|1.5555 ~~1.5555 Math.floor(1.5555) (1.5555-0.5).toFixed(0) Math.round(1.5555-0.5)
2.向上取整
Math.ceil(1.5555) (1.5555+0.5).toFixed(0) Math.round(1.5555+0.5)
3.四舍五入
1.5555.toFixed(0) Math.round(1.5555)
1.向下取整
2.向上取整
3.四舍五入