Function rectangleIntersectsSegment

Returns true if the given rectangle intersects the given segment.