code: static double max(double[] values) {
          double max = values[0];
          for (double value : values)
              if (value > max) max = value;
          return max;
      }
docs: Analog of Math.max that returns the largest double value in an array of doubles.
  
  @param   values  the values to be searched for the largest value among them
  @return   the largest value among a set of given values