So you want to sort clockwise, but in the event that some points have the same angle from the start point (Wherever 0 degrees points) then you want to sort by what? Closest point to the center?
Either way, they're just vectors so you can find the magnitude and angle and use both to sort the points however you like.
class Vector2
{
public:
Vector2(double _X, double _Y)
{
X = _X; Y = _Y;
}
double LengthSquared()
{
return (X*X + Y*Y);
}
double Length()
{
return sqrt(X*X + Y*Y);
}
double AngleWith(const Vector2& other)
{
double val = (X*other.X + Y*other.Y)/(GetLength()*other.GetLength());
return acos(val);
}
double X;
double Y
}
A very simple vector class for you there, bear in mind that when you get the angle between two vectors that the result will always be 180 degrees or less because it will always return the smallest angle so you will need to take that into consideration.
EDIT: Gosh darn it, replying to a question from over two weeks ago. [Note to self: Check date of question before answering, even if its at the top of QA]