docs: public double getNthOrderedValue(double[] array, int n, boolean ascending) {
  
          if (n > array.length) {
              n = array.length;
          }
  
          int targetindex;
          if (ascending) {
              targetindex = n;
          } else {
              targetindex = array.length - n;
          }
  
          // this value is the value of the numKey-th element
  
          return getOrderedValue(array, targetindex);
      }