title: Overlapping line segments in 2D space
body: <p>I need to find whether two lines overlap each other. I have the intersection code which returns 0, if two lines are parallel. But then I need to know if these two parallel lines overlap.</p>
  
  <p><strong>Edit:</strong></p>
  
  <pre><code>A                    C       B                D
  -----------------------------------------------
  </code></pre>
  
  <p>Line 1: A-B</p>
  
  <p>Line 2: C-D</p>
  
  <p>I need to find if Line 1 overlaps Line 2, but both lines can have a slope > 0.</p>