AcManager.Controls.OxyPlotGraphViewer.CanonicalSplineHelper.CreateSpline C# (CSharp) Method

CreateSpline() static private method

static private CreateSpline ( IList points, double tension, double tolerance ) : List
points IList
tension double
tolerance double
return List
            internal static List<ScreenPoint> CreateSpline(IList<ScreenPoint> points, double tension, double tolerance) {
                var screenPointList = new List<ScreenPoint>(points?.Count ?? 0);
                if (points == null) return screenPointList;

                var count = points.Count;
                if (count < 2) {
                    screenPointList.AddRange(points);
                    return screenPointList;
                }

                for (var i = 0; i < count - 1; ++i) {
                    Segment(screenPointList, points[i == 0 ? 0 : i - 1], points[i], points[i + 1], points[i == count - 2 ? i + 1 : i + 2], tension,
                            tolerance);
                }

                return screenPointList;
            }

Same methods

OxyPlotGraphViewer.CanonicalSplineHelper::CreateSpline ( List points, double tension, double tolerance ) : List
OxyPlotGraphViewer.CanonicalSplineHelper