/ Published in: ActionScript 3
Removes duplicating elements from Array, containing only objects of Point class
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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; }
URL: unique-points-array