Rounds a number to the nearest step interval.
Number to round.
Interval to snap to; must be finite and non-zero.
The nearest multiple of step to value.
step
value
roundToStep(5.26, 0.25); // 5.25roundToStep(-5.26, 0.25); // -5.25 Copy
roundToStep(5.26, 0.25); // 5.25roundToStep(-5.26, 0.25); // -5.25
When step is 0, or fails the isFiniteNumber guard.
0
Rounds a number to the nearest step interval.