abs-floor.js 179 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 export default function absFloor(number) { if (number < 0) { // -0 -> 0 return Math.ceil(number) || 0; } else { return Math.floor(number); } }