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

AVL.PointToLineDistance Method

Measures the distance between a point and a line.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void PointToLineDistance(
	AvlNet.Point2D inPoint,
	AvlNet.Line2D inLine,
	float inResolution,
	out float outDistance,
	out AvlNet.Segment2D outConnectingSegment
)

Parameters

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

Examples

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

Errors

Error type Description
DomainError Indefinite line on input in PointToLineDistance.

See also