You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

448 B

Cut corners

Instructions

Create a function for each rounding math functions:

  • round (like Math.round)
  • ceil (like Math.ceil)
  • floor (like Math.floor)
  • trunc (like Math.trunc)

Some restrictions apply:

  • You may not use strings conversion to do it
  • No bitwise operator

Notions

Code provided

Math.round = Math.ceil = Math.floor = Math.trunc = undefined