test if two lines intersect