Returns the distance from a point p to a line segment a to b.
p
a
b
{number, number} b segment point 2 longitude, latitude