public static void normalize ( double [ ] doubles ) { double sum = 0 ; for ( int i = 0 ; i < doubles . length ; i ++ ) { sum += doubles [ i ] ; } normalize ( doubles , sum ) ; }
Normalizes the doubles in the array by their sum .