public static float DistancePointToLine(Vector2 p, Vector2 a, Vector2 b);
Расстояние от точки p в 2d до линии, определяемой двумя точками a и b.
p
a
b