roundStep()function

roundStep(num: number, step = 1): number
ParamType
numnumber
The number to round. required
stepunknown
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