src/helpers/roundToStep.js
function roundToStep (value, step) {
  const stepDecimals = calculateDecimals(step);
  const stepDecimalsMultiplier = Math.pow(10, stepDecimals);

  value = Math.round(value / step) * step;

  return Math.round(value * stepDecimalsMultiplier) / stepDecimalsMultiplier;
}
function roundToStep (value, step) {
  const stepDecimals = calculateDecimals(step);
  const stepDecimalsMultiplier = Math.pow(10, stepDecimals);

  value = Math.round(value / step) * step;

  return Math.round(value * stepDecimalsMultiplier) / stepDecimalsMultiplier;
}
function roundToStep ( value , step ) { const stepDecimals = calculateDecimals ( step ) ; const stepDecimalsMultiplier = Math . pow ( 10 , stepDecimals ) ; value = Math . round ( value / step ) * step ; return Math . round ( value * stepDecimalsMultiplier ) / stepDecimalsMultiplier ; }
Rounds value to step
Rounds value to step