Method DistancePointToLine
DistancePointToLine(Vector2, Vector2, Vector2)
Computes the perpendicular distance from a point to the infinite line passing through two points.
public static float DistancePointToLine(Vector2 l1, Vector2 l2, Vector2 p)
Parameters
l1Vector2First point on the line.
l2Vector2Second point on the line.
pVector2Point to measure from.