FitLineToPoints


Approximates points with a line using the Least Squares method.

Syntax

C++
C#
Python
 
def FitLineToPoints(
	inPoints: list[Point2D],
	/,
	*,
	inRange: Range | None = None
)
-> (
	outLine: Line2D,
	outError: float
)

Parameters

Name Type Default Description
Input value inPoints list[Point2D]
Input value inRange Range | None None Determines which array points take part in fitting process
Output value outLine Line2D
Output value outError float Sum of the point distances from the output line