You are here: Start » AVL.NET » AVL.PathToLineDistance Method

AVL.PathToLineDistance Method

Computes the smallest distance between a path and a line.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void PathToLineDistance(
	AvlNet.Path inPath,
	AvlNet.Line2D inLine,
	float inResolution,
	out float outDistance,
	out AvlNet.Segment2D outConnectingSegment
)

Parameters

Name Type Range Default Description
inPathAvlNet.PathInput path.
inLineAvlNet.Line2DInput line.
inResolutionfloat<0.0f, INF>1.0fNumber of real-world units per one pixel. Default value: 1.0f.
outDistancefloatMinimal distance between input path and input line.
outConnectingSegmentAvlNet.Segment2DSegment connecting input path and input line having minimal length

Errors

Error type Description
DomainError Empty path on input in PathToLineDistance.
DomainError Indefinite line on input in PathToLineDistance.

See also