using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _07_1_Calkowanie
{

  public delegate double fx(double x);

  public class Preprocesor
  {
    public fx fun;
    public double a;
    public double b;
    // dla n+1 punktów
    public int n;
    public double[] X;
    public double[] Y;
    public double h;
    public void Oblicz()
    {
      h = (b - a) / n;
      X = new double[n + 1];
      Y = new double[n + 1];
      for (int i = 0; i <= n; i++)
      {
        X[i] = a + i * h;
        Y[i] = fun(X[i]);
      }
    }
  }
}
