static double max ( double [ ] values ) { double max = values [ 0 ] ; for ( double value : values ) if ( value > max ) max = value ; return max ; }
Analog of Math . max that returns the largest double value in an array of doubles .