def lines_touch_2D(ab, cd):
return lines_colinear(ab, cd) | np.isfinite(line_intersection_2D(ab, cd)[<NUM_LIT:0>])<EOL>
lines_touch_2D((a,b), (c,d)) is equivalent to lines_colinear((a,b), (c,d)) |
numpy.isfinite(line_intersection_2D((a,b), (c,d))[0])