MathHelperPointInSegment Method
|
Checks if a point is inside a line segment.
Namespace:
DXFReaderNET
Assembly:
DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax public static int PointInSegment(
Vector2 Position,
Vector2 StartPoint,
Vector2 EndPoint
)
Public Shared Function PointInSegment (
Position As Vector2,
StartPoint As Vector2,
EndPoint As Vector2
) As Integer
public:
static int PointInSegment(
Vector2 Position,
Vector2 StartPoint,
Vector2 EndPoint
)
static member PointInSegment :
Position : Vector2 *
StartPoint : Vector2 *
EndPoint : Vector2 -> int
STATIC METHOD PointInSegment(
Position AS Vector2,
StartPoint AS Vector2,
EndPoint AS Vector2
) AS LONG
Parameters
- Position
- Type: DXFReaderNETVector2
A point. - StartPoint
- Type: DXFReaderNETVector2
Segment start point. - EndPoint
- Type: DXFReaderNETVector2
Segment end point.
Return Value
Type:
Int32Zero if the point is inside the segment, 1 if the point is after the end point, -1 if the point is before the start point and -2 if the point doesn't belong to the segment.
See Also