fn distance_to_segment(p: Pos2, a: Pos2, b: Pos2) -> f32
Returns the shortest distance between point p and the line segment a -> b.
p
a -> b