def segments_touch_2D(ab, cd):
return segments_colinear(ab, cd) | np.isfinite(segment_intersection_2D(ab, cd)[<NUM_LIT:0>])<EOL>
segmentss_touch_2D((a,b), (c,d)) is equivalent to segments_colinear((a,b), (c,d)) |
numpy.isfinite(segment_intersection_2D((a,b), (c,d))[0])