in this piece of code, I compare an array of points and order them from least to greatest.