Here you can find the source of max(double... values)
Parameter | Description |
---|---|
values | a parameter |
public static double max(double... values)
//package com.java2s; //License from project: Open Source License public class Main { /** Returns the maximum of a list of doubles */* ww w . ja va 2s . co m*/ * @param values * @return */ public static double max(double... values) { double max = Double.NEGATIVE_INFINITY; if (values != null) { for (int i = 0; i < values.length; i++) { if (values[i] > max) { max = values[i]; } } } return max; } }