Line2d.FindLinearLeastSquaresFit Method

Computes a least squares fit line of a list of points, starting at x0 and ending at x1. The error minimized is the y-diff to line only (not real distance to line).
public static Line2d FindLinearLeastSquaresFit( 
   List<Point2d> points
   double x0
   double x1 
)

Parameters

points
List<Point2d>

x0
double

x1
double

Return Value

Line2d

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition