1+3.5 => +3.0
2-3.5 => -4.0
3
4+3.5 => +3.0 using Math.floor()
5-3.5 => -3.0 using Math.ceil()
1//standard round function, except round .5 down instead of up
2function roundHalfDown(num) {
3 return -Math.round(-num);
4}
5roundHalfDown(1.5);// 1
6roundHalfDown(1.6);// 2