Function isLineSegmentTouchingOrCrossingLine