Intersection checks for line segment vs line segment and point vs line segment