Return to Snippet

Revision: 10947
at January 19, 2009 05:36 by Wiederkehr


Initial Code
function randomizeArray(array:Array):Array{
	var newArray:Array = new Array();
	while(array.length > 0){
		newArray.push(array.splice(Math.floor(Math.random()*array.length), 1));
	}
	return newArray;
}

Initial URL

                                

Initial Description

                                

Initial Title
AS3 randomize array

Initial Tags
textmate, array

Initial Language
Other