Click or drag to resize
PickEventArgsPointToLine Method
Compute the distance from the point (Px, Py) to the line segment AB.

Namespace: Imsl.Chart2D
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public static double PointToLine(
	int Px,
	int Py,
	int[] devA,
	int[] devB
)

Parameters

Px
Type: SystemInt32
An int which specifies the x coordinate of the point (Px,Py).
Py
Type: SystemInt32
An int which specifies the y coordinate of the point (Px,Py).
devA
Type: SystemInt32
An int[] which specifies the point that defines the head of the line segment.
devB
Type: SystemInt32
An int[] which specifies the point that defines the tail of the line segment.

Return Value

Type: Double
A double which contains the distance from the point (Px,Py) to the line segment AB.
Remarks
If the closest point from P to the line AB is not between A and B then the distance to the closer of A and B is returned.
See Also