Two Segments Intersect? One method: solve for the intersection point of the two lines containing the two line segments, and then check whether this point.
TU/e computational geometry introduction Mark de Berg.