public static double max ( double [ ] [ ] values ) { double max = 0 ; for ( int i = 0 ; i < values . length ; i ++ ) { for ( int j = 0 ; j < values [ i ] . length ; j ++ ) { max = ( values [ i ] [ j ] > max ) ? values [ i ] [ j ] : max ; } } return max ; }
Finds and returns the maximum value in a 2 - dimensional array of doubles .