code: function round(number, step) {
  	  if (step < 1) {
  	    var places = getDecimalPlaces(step);
  	    return parseFloat(number.toFixed(places));
  	  }
  
  	  return Math.round(number / step) * step;
  	}
docs: Round to the nearest step