mirror of https://github.com/01-edu/public.git
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.
davhojt
c7a51d50a2
|
2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago |
README.md
Cut Corners
Instructions
Create some functions which behave like JavaScript's Math
rounding functions:
round
: which behaves similar toMath.round()
.ceil
: which behaves similar toMath.ceil()
.floor
: which behaves similar toMath.floor()
.trunc
: which behaves similar toMath.trunc()
.
Some restrictions apply:
- You may not use strings conversion to do it
- No bitwise operator
Notions
Code provided
The provided code will be added to your solution, and does not need to be submitted.
Math.round = Math.ceil = Math.floor = Math.trunc = undefined