If I have the following array structure of polygon vertices (polygons can be both convex and concave):
[ [x = 5, y = 5], [x = 10, y = 10], [x = 3, y = 15], [x = 0, y = 7] ]
I can easily tell if the polygon is clockwise or counter clockwise. But how do I convert it? If I reverse the array, it works for the examples I can think about but does it work for every polygon?