Click or drag to resize

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
)

Parameters

Position
Type: DXFReaderNETVector2
A point.
StartPoint
Type: DXFReaderNETVector2
Segment start point.
EndPoint
Type: DXFReaderNETVector2
Segment end point.

Return Value

Type: Int32
Zero 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