find Closest Distance Between Line And Point
Unidirectional, meaning if the closest point is 'behind' the starting point, returns the distance from the starting point.
Parameters
p
The point
p1
The starting point of the line
d1
The direction of the line