docs: public int getIntervalNumber(double x) {
  		if (x<points[0]) {
  			return 0;
  		} else if (x>=points[points.length-1]) {
  			return points.length;
  		}
  		for(int i=0; i<points.length-2;i++) {
  			if ( x< points[i+1]) {
  				return i+1;
  			}
  		}
  		return points.length-1;
  	}