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

AVL.SegmentToSegmentDistance

Measures the distance between two segments.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void SegmentToSegmentDistance
(
	AvlNet.Segment2D inSegment1,
	AvlNet.Segment2D inSegment2,
	float inResolution,
	out float outDistance,
	NullableValue<AvlNet.Segment2D> outConnectingSegment
)

Parameters

Name Type Range Default Description
inSegment1AvlNet.Segment2D
inSegment2AvlNet.Segment2D
inResolutionfloat<0.0f, INF>1.0fNumber of real-world units per one pixel. Default value: 1.0f.
outDistancefloat
outConnectingSegmentAvlNet.NullableValue<AvlNet.Segment2D> Can be null to skip this parameter calculation.

Examples

SegmentToSegmentDistance performed on two sample segments. The green segment is the value of outConnectingSegment output.

Function Overrides

See also