src/LineSegment.java
/**
     * Check if line segments intersect
     * @param a first line segment
     * @param b second line segment
     * @return <code>true</code> if lines do intersect,
     *         <code>false</code> otherwise
     */
Check if line segments intersect
@param a first line segment
@param b second line segment
@return true if lines do intersect,
false otherwise
Check if line segments intersect @param a first line segment @param b second line segment @return true if lines do intersect false otherwise
public static boolean doLinesIntersect(LineSegment a, LineSegment b) {
        Point[] box1 = a.getBoundingBox();
        Point[] box2 = b.getBoundingBox();
        return doBoundingBoxesIntersect(box1, box2)
                && lineSegmentTouchesOrCrossesLine(a, b)
                && lineSegmentTouchesOrCrossesLine(b, a);
    }
public static boolean doLinesIntersect ( LineSegment a , LineSegment b ) { Point [ ] box1 = a . getBoundingBox ( ) ; Point [ ] box2 = b . getBoundingBox ( ) ; return doBoundingBoxesIntersect ( box1 , box2 ) && lineSegmentTouchesOrCrossesLine ( a , b ) && lineSegmentTouchesOrCrossesLine ( b , a ) ; }
Check if line segments intersect
 @param a first line segment
 @param b second line segment
 @return <code>true</code> if lines do intersect,
         <code>false</code> otherwise
Check if line segments intersect @param a first line segment @param b second line segment @return <code > true< / code > if lines do intersect <code > false< / code > otherwise