showing results for - "remove floating point javascript"
Emy
01 Feb 2016
1Math.floor(5.9) // 5 rounds down
2Math.ceil(5.1) // 6 rounds up
3Math.round(5.5) // 6 round to nearest integer
4Math.trunc(5.1) // 5 removes fractional part