PickEventArgsPointToLine Method |
Compute the distance from the point (Px,
Py) to the line segment AB.
Namespace: Imsl.Chart2DAssembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax public static double PointToLine(
int Px,
int Py,
int[] devA,
int[] devB
)
Public Shared Function PointToLine (
Px As Integer,
Py As Integer,
devA As Integer(),
devB As Integer()
) As Double
public:
static double PointToLine(
int Px,
int Py,
array<int>^ devA,
array<int>^ devB
)
static member PointToLine :
Px : int *
Py : int *
devA : int[] *
devB : int[] -> float
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