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

AVL.FitLineToPoints Method

Approximates points with a line using the Least Squares method.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void FitLineToPoints(
	AvlNet.Point2D[] inPoints,
	out AvlNet.Line2D outLine,
	out float outError
)

Parameters

Name Type Range Default Description
inPointsAvlNet.Point2D
outLineAvlNet.Line2D
outErrorfloat

Examples

The resulting outLine drawn with the input points.

Errors

Error type Description
DomainError Empty point array in FitLineToPoints.

See also