/// <summary> /// Adds a control point to the curve. /// </summary> /// <param name="input">The curves input value.</param> /// <param name="output">The curves output value.</param> public void Add(double input, double output) { var kvp = new CurveControlPoint() { X = input, Y = output }; if (!ControlPoints.Contains(kvp)) { ControlPoints.Add(kvp); } ControlPoints.Sort(delegate(CurveControlPoint lhs, CurveControlPoint rhs) { return(lhs.X.CompareTo(rhs.X)); }); }
/// <summary> /// Adds a control point to the curve. /// </summary> /// <param name="input">The curves input value.</param> /// <param name="output">The curves output value.</param> public void Add(double input, double output) { var kvp = new CurveControlPoint() { X = input, Y = output }; if (!ControlPoints.Contains(kvp)) { ControlPoints.Add(kvp); } ControlPoints.Sort(delegate(CurveControlPoint lhs, CurveControlPoint rhs) { return lhs.X.CompareTo(rhs.X); }); }