public static double max(final double[] values) {
		double max = NaN;
		if (values.length > 0) {
			max = values[0];

			for (double value : values) {
				if (value > max) {
					max = value;
				}
			}
		}

		return max;
	}
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}.
jenetics/src/main/java/io/jenetics/stat/DoubleSummary.java