code: public static double max(final double[] values) {
  		double max = NaN;
  		if (values.length > 0) {
  			max = values[0];
  
  			for (int i = 0; i < values.length; ++i) {
  				if (values[i] > max) {
  					max = values[i];
  				}
  			}
  		}
  
  		return max;
  	}
docs: Return the maximum value of the given double array.
  
  @since 4.0
  
  @param values the double array.
  @return the maximum value or {@link Double#NaN} if the given array is
  empty.
  @throws NullPointerException if the given array is {@code null}.