Re: [Flashcoders] Re: sorting a collection of points clockwise

2006-02-27 Thread Bart Wttewaall
Thanks, I guess I needed a little nudge to actually get working on the method. If anyone sees a quicker method than the code below, then please say so. Thanks Ron, A.Cicak others! function orderClockwise(coll:Array, center:Point):Array { if (!center) center = getCenterPoint(coll);

Re: [Flashcoders] Re: sorting a collection of points clockwise

2006-02-27 Thread Morten Barklund TBWA\\Play
Bart Wttewaall wrote: Thanks, I guess I needed a little nudge to actually get working on the method. If anyone sees a quicker method than the code below, then please say so. This would actually be one of the few places, where Array.RETURNINDEXEDARRAY could be used - just create an array of

Re: [Flashcoders] Re: sorting a collection of points clockwise

2006-02-27 Thread Bart Wttewaall
Thanks Morten, that actually made it 23% faster :-) 2006/2/27, Morten Barklund TBWAPlay [EMAIL PROTECTED]: Bart Wttewaall wrote: Thanks, I guess I needed a little nudge to actually get working on the method. If anyone sees a quicker method than the code below, then please say so. This

[Flashcoders] Re: sorting a collection of points clockwise

2006-02-26 Thread A.Cicak
atan2 should do the trick Bart Wttewaall [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi List, I'm looking for an algorithm that sorts a collection of points counter-, or clockwise by (probably) means of comparing each point to the center point of the collection. Calculating the