moved lineSegmentIntersection to dot/util