You are here: Start » AVL.NET » Function Reference » Geometry 2D » Geometry 2D Distance Metrics » AVL.PointToSegmentDistance

AVL.PointToSegmentDistance

Measures the distance between a point and a segment.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void PointToSegmentDistance
(
	AvlNet.Point2D inPoint,
	AvlNet.Segment2D inSegment,
	float inResolution,
	out float outDistance,
	out AvlNet.Segment2D outConnectingSegment
)

Parameters

Name Type Range Default Description
inPointAvlNet.Point2D
inSegmentAvlNet.Segment2D
inResolutionfloat<0.0f, INF>1.0fNumber of real-world units per one pixel. Default value: 1.0f.
outDistancefloat
outConnectingSegmentAvlNet.Segment2D

Examples

PointToSegmentDistance performed on a sample point and a sample segment. The green segment is the value of outConnectingSegment output.

Function Overrides

See also