roundStep()function
roundStep(num: number, step = 1): number
| Param | Type | |
|---|---|---|
num | number | The number to round. required |
step | unknown | The rounding to round to, e.g. 2 or 0.1 (defaults to 1, i.e. round numbers). Defaults to 1 |
| Return | |
|---|---|
number | The number rounded to the specified step. |
Round numbers to a given step.
Examples
roundStep(17, 5) // 15