Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shuffle method to ArrayUtil class #170

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

endel
Copy link

@endel endel commented Jun 26, 2011

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

@peterver
Copy link

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 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants