code: public int getLocation(Object value) {
      int		result;
      double	distance;
      double	currDistance;
      int		i;
  
      result = 0;
  
      // determine x
      distance = m_Step;
      for (i = 0; i < width(); i++) {
        currDistance = StrictMath.abs(((Double) value) - ((Double) getValue(i)));
        if (Utils.sm(currDistance, distance)) {
  	distance = currDistance;
  	result   = i;
        }
      }
  
      return result;
    }
docs: returns the closest index for the given value in the dimension.
  
  @param value	the value to get the index for
  @return		the closest index in the dimension