title: How to find direction of a vector path
body: <p>I have a vector path (made up from lineto, curveTo points) and I want to determine its direction (clockwise, anticlockwise).</p>
  
  <p>Is there any algorithm which can be used for the same?</p>
  
  <p>The reason I want to do this is that I am getting two paths from different functions; one is always clockwise but the other function returns anticlockwise paths sometimes; when I combine these two paths and fill the resultant path then the non-zero winding fill rule creates a hole in the regions where the path overlaps.</p>
  
  <p>So I am trying to solve the problem by converting all paths to clockwise direction before combining them.</p>