title: Sort Four Points in Clockwise Order
body: <p>Four 2D points in an array. I need to sort them in clockwise order. I think it can be done with just one swap operation but I have not been able to put this down formally.</p>
  
  <p><strike>Edit: The four points are a convex polygon in my case.</strike></p>
  
  <p>Edit: The four points are the vertices of a convex polygon. They need not be in order.</p>