code: function getGridDimension(diff, step) {
  
          // return step if diff = 0
          if (!diff) return step;
  
          var absDiff = Math.abs(diff);
          var numSteps = Math.round(absDiff / step);
  
          // return absDiff if less than one step apart
          if (!numSteps) return absDiff;
  
          // otherwise, return corrected step
          var roundedDiff = numSteps * step;
          var remainder = absDiff - roundedDiff;
          var stepCorrection = remainder / numSteps;
  
          return step + stepCorrection;
      }
docs: helper function for getGrid()