Return a long double between 0 and 1 representing the location of the closest point on the 3D segment to the given point, as a fraction of total segment length.
closest_point_on_segment