How can one calculate the winding number of a polygon given as
<br>
a list of vertices in some (counter-clockwise or clockwise) order?

The complexity of the algorithm must be linear time.