You are here: Start » AVL.NET » AVL.FitLineToPoints
Approximates points with a line using the Least Squares method.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void FitLineToPoints ( AvlNet.Point2D[] inPoints, out AvlNet.Line2D outLine, out float outError )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPoints | AvlNet.Point2D[] | |||
![]() | outLine | AvlNet.Line2D | |||
![]() | outError | float |
Examples
![]() |
The resulting outLine drawn with the input points.
Errors
Error type | Description |
---|---|
DomainError | Empty point array in FitLineToPoints. |