code: public static double min(double a, double b) {
          if (Double.isNaN(a)) {
              return b;
          }
          if (Double.isNaN(b)) {
              return a;
          }
          return a < b ? a : b;
      }
docs: Returns the minimum between the two parameters
  
  @param a
  @param b
  @return `\min(a,b)`