package classes.matuto.utils.model
{
	public class Sort
	{
		
		public static function sortBoolean() :Boolean
		{
			return (Math.random()>.5);
		}		
		
		public static function sortNumber(v1 :Number, v2 :Number) :Number
		{			
			var v :Number;
			
			if(sortBoolean()) v = v1;
			else v = v2;
			
			return v;			
		}
		
		public static function sortArray(a :Array) :void
		{
			var b :Array = a.sort(shuffle);
			
			a = b;
		}
		
		private static function shuffle(a,b):int {
			var num : int = Math.round(Math.random()*2)-1;
			return num;
		}
		
	}
}