IMathDistancePointToLine(PointD, PointD, PointD, PointD) Method

Calculates the distance between a line and a point (PointDistance).

Definition

Namespace: PCBI.MathUtils
Assembly: PCB-Investigator (in PCB-Investigator.exe) Version: 0
C#
public static double DistancePointToLine(
	PointD PointDistance,
	PointD LineP1,
	PointD LineP2,
	out PointD DestinationPoint
)

Parameters

PointDistance  PointD
The single point who is of interest.
LineP1  PointD
One of the line points.
LineP2  PointD
Second of the line points.
DestinationPoint  PointD
Where have they the nearest point on the line?

Return Value

Double
distance between nearest point and the PointDistance.

See Also