Return to Snippet

Revision: 56338
at March 22, 2012 18:58 by romech


Initial Code
function removeDuplicates (input:Array):Array
{
	var unique:Array = new Array();
	testLoop:for (var l:uint = 0; l < input.length; l++)
	{
		for (var m:uint = 0; m < unique.length; m++)
		{
			if ((input[l] as Point).equals(unique[m]))
			{
				continue testLoop;
			}
		}
		unique.push(input[l]);
	}
	return unique;
}

Initial URL
unique-points-array

Initial Description
Removes duplicating elements from Array, containing only objects of Point class

Initial Title
Remove duplicating Points from Array

Initial Tags
array

Initial Language
ActionScript 3