Added functions for distance between line segment and point and between two line segments