# Find and sort 2d array elements like radar

Any ideas are appreciated

• ("scan|sweep line" or "line|plane scan|scanning|sweep|sweeping" and "polar coordinates"?) Are you looking for terminology or algorithm? Tag accordingly! Feb 25 '20 at 9:11
• Take a look at stackoverflow.com/questions/6989100/… Feb 25 '20 at 17:12
• This reminds me of parts of the Jarvis March algorithm or Graham scan for convex hull calculation. Maybe these articles will give you some additional wording clues. Feb 25 '20 at 22:38

let radarSortedPoints: [CGPoint] = points.sorted { pointA, pointB -> Bool in

• @Laakeri Isyourspacekeybroken? lol why would you type def something as clear as complex<long long> to something as arbitrary and cryptic as co? Feb 25 '20 at 23:37