title: Determine if a line segment intersects a polygon
body: <p>If I have a vector (a line consisting of 2 points) on a 2D plane how can I determine if it has passed through a polygon?</p>
  <p>I know I can take each line which makes up the polygon and see if any intersect but is there a better way?</p>
  <p>I've read this one post <a href="https://stackoverflow.com/questions/217578/point-in-polygon-aka-hit-test">How can I determine whether a 2D Point is within a Polygon?</a> which gives me some ideas for seeing whether the point is within a polygon but I need to see if it has passed over/intersected it.</p>