/// <summary> /// find x bound as said in doc. /// </summary> /// <returns></returns> private double FindXBound() { double x = X0; while (Math.Abs(TaylorEquation.Function(x) - Math.Sin(x)) < 0.01) { x += 0.1; } return(2 * x); }
public Taylor(int n, double x0, MainWindow mainWindow) { Equation = new Equation(); Equation.Color = Brushes.Red; Equation.Function = Math.Sin; X0 = x0; TaylorEquation = new TaylorEquation(n, X0, Equation.Function); MainWindow = mainWindow; SetPlottingSpace(MainWindow.TaylorDrawingCanvas); }