as3corelib icon indicating copy to clipboard operation
as3corelib copied to clipboard

Add shuffle method to ArrayUtil class

Open endel opened this issue 13 years ago • 1 comments

It's a simple feature that are implemented in different ways around the community. It would be nice if as3corelib natively support it.

var array : Array = new Array(1,2,3,4,5); ArrayUtil.shuffle(array); trace(array); // shuffled items

endel avatar Jun 26 '11 06:06 endel

Shuffling something isn't really a prime feature ... it's not necessary for wide usage. As such i think it'd be not a good idea to add as it would increase the swc size ( without needing it most of the time ). If you need a shuffling function then i suggest taking the source and extending it :) ( it's not that hard to write one )

peterver avatar Sep 23 '11 12:09 peterver