Sorting by polar angle

Revision en1, by ScienceGuy, 2018-07-25 17:52:31

I am trying to sort vector of points (pairs of integers) by the polar angle in counter-clockwise order around the first entry of the vector. I get wrong output, but can't find the problem in the code. I will appreciate it if you point out what I'm doing wrong. Here is my code: https://pastebin.com/mn6jZgyF

Tags polar angle, sorting, computational geometry

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ScienceGuy 2018-07-25 17:52:31 329 Initial revision (published)