title: How can I check if two segments intersect?
body: <p>How can I check if 2 segments intersect?</p>
  
  <p>I've the following data:</p>
  
  <pre><code>Segment1 [ {x1,y1}, {x2,y2} ]
  Segment2 [ {x1,y1}, {x2,y2} ] 
  </code></pre>
  
  <p>I need to write a small algorithm in Python to detect if the 2 lines are intersecting.</p>
  
  <p><br><img src="https://i.stack.imgur.com/AlB0e.png" alt="alt text"></p>