- added closest point to line segment and point in 2D