You are here: Start » FIL.NET » FIL.FitLineToPoints
Approximates points with a line using the Least Squares method.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void FitLineToPoints ( IList<FilNet.Point2D> inPoints, FilNet.Range? inRange, out FilNet.Line2D outLine, NullableValue<float> outError )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inPoints | System.Collections.Generic.IList<FilNet.Point2D> | |||
![]() | inRange | FilNet.Range? | Determines which array points take part in fitting process. Default value: ftl::NIL. | ||
![]() | outLine | FilNet.Line2D | |||
![]() | outError | FilNet.NullableValue<float> | Can be null to skip this parameter calculation. |
Examples
![]() |
The resulting outLine drawn with the input points.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty array of points in FitLineToPoints. |
DomainError | Range exceeds the input point array in FitLineToPoints. |
Function Overrides
- FitLineToPoints(IList<Point2D>, Line2D)
- FitLineToPoints(IList<Point2D>, Line2D, NullableValue<Single>)
- FitLineToPoints(IList<Point2D>, Nullable<Range>, Line2D)
- FitLineToPoints(IList<Point2D>, Nullable<Range>, Line2D, Single)