cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

abs-floor.js (179B)


      1export default function absFloor(number) {
      2    if (number < 0) {
      3        // -0 -> 0
      4        return Math.ceil(number) || 0;
      5    } else {
      6        return Math.floor(number);
      7    }
      8}