public static void shuffle ( float [ ] floatArray ) { int swapPlace = - 1 ; for ( int i = 0 ; i < floatArray . length ; i ++ ) { swapPlace = ( int ) ( Math . random ( ) * ( floatArray . length - 1 ) ) ; TrivialSwap . swap ( floatArray , i , swapPlace ) ; } }
Randomly shuffle an float array