snippetMinor
Find and sort 2d array elements like radar
Viewed 0 times
elementsarraylikeradarfindandsort
Problem
I don't know relevant keywords about this algorithm.
I can show you visually
Any ideas are appreciated
I can show you visually
Any ideas are appreciated
Solution
For each of your points in the field, calculate the red angle:
Then sort all the (point, angle)-tuples by the angle.
Then sort all the (point, angle)-tuples by the angle.
Context
StackExchange Computer Science Q#121113, answer score: 9
Revisions (0)
No revisions yet.