Math.ceil.js 398 B

1234567891011121314151617
  1. try {
  2. assert(Math.ceil(0.95) === 1);
  3. assert(Math.ceil(4) === 4);
  4. assert(Math.ceil(7.004) == 8);
  5. assert(Math.ceil(-0.95) === -0);
  6. assert(Math.ceil(-4) === -4);
  7. assert(Math.ceil(-7.004) === -7);
  8. assert(isNaN(Math.ceil()));
  9. assert(isNaN(Math.ceil(NaN)));
  10. assert(Math.ceil.length === 1);
  11. console.log("PASS");
  12. } catch (e) {
  13. console.log("FAIL: " + e);
  14. }