Calculate the angle between the center and the point, and subtract 90
to get 12 o'clock to 0degrees and add 270 to negative numbers to put
them between 270 and 360 degrees.
Ron
Bart Wttewaall wrote:
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 centerpoint wasn't
too hard, but I'm stuck at the comparing part. It doesn't matter which
point the returning array begins with, but I'd like the method to be
as fast as possible since it will be called every frame.
I'm not asking for a complete solution (although appreciated) but for
a few tips how to tackle this one.
Thanks,
Bart Wttewaall
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com