docs: protected void bisectionSearch(float val, int lowerLimit, int upperLimit) {
  		while (upperLimit - lowerLimit > 1) {
  			int middle = (upperLimit + lowerLimit) / 2;
  			if (val >= x[middle] && ascend) {
  				lowerLimit = middle;
  			} else {
  				upperLimit = middle;
  			}
  		}
  
  		// decide if it should hunt or locate next time
  		doHunt = Math.abs(lowerLimit - center) > dj;
  
  		// make sure the points sampled for the polynomial are all within bounds
  		center = lowerLimit;
  		index0 = center - M / 2;
  		if (index0 + M > size) {
  			index0 = size - M;
  		} else if (index0 < 0) {
  			index0 = 0;
  		}
  	}