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.
|
|
|
## 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
|
|
|
|
|
|
|
|
- [devdocs.io/javascript/global_objects/math](https://devdocs.io/javascript/global_objects/math)
|
|
|
|
|
|
|
|
|
|
|
|
### Code provided
|
|
|
|
|
|
|
|
> all code provided will be added to your solution and doesn't need to be submited.
|
|
|
|
|
|
|
|
```js
|
|
|
|
Math.round = Math.ceil = Math.floor = Math.trunc = undefined
|
|
|
|
```
|