code: public Point getPointAtPrecision(double precision) {
          //Find the LOWEST threshold that gives the specified precision
  
          for (int i = 0; i < this.precision.length; i++) {
              if (this.precision[i] >= precision) {
                  return new Point(i, threshold[i], this.precision[i], recall[i]);
              }
          }
  
          //Not found, return last point. Should never happen though...
          int i = threshold.length - 1;
          return new Point(i, threshold[i], this.precision[i], this.recall[i]);
      }
docs: Get the point (index, threshold, precision, recall) at the given precision.<br>
  Specifically, return the points at the lowest threshold that has precision equal to or greater than the
  requested precision.
  
  @param precision Precision to get the point for
  @return point (index, threshold, precision, recall) at (or closest exceeding) the given precision