Here's the solution: https://en.wikipedia.org/wiki/Curve_orientation#Orientation_of_a_simple_polygon
Works also for concave polygons, as pointed out in the "practical considerations" section (basically the middle point for the test needs to be the topmost and leftmost point).