using System.Drawing;

namespace MathLib;

public class Math
{
  static public float Reccursive(float n)
  {
    return Reccursive(n, 1);
  }

  static private float Reccursive(float n, float i)
  {
    return n;
  }

  public float Substract(float a, float b)
  {
    return a - b;
  }

  public float Multiply(float a, float b)
  {
    return a * b;
  }

  public float Divide(float a, float b)
  {
    return a / b;
  }

  public float Power(float a)
  {
    return a * a;
  }

  public float Add(float a, float b)
  {
    return a + b;
  }

  public List<float> Iterate(float a, float b)
  {
    return [a, b];
  }

  public float Sum(List<float> list)
  {
    float sum = 0;
    foreach (float item in list)
    {
      sum += item;
    }
    return sum;
  }

  public Point SumPoints(List<Point> list)
  {
    Point sum = new Point(0, 0);
    foreach (Point item in list)
    {
      sum.X += item.X;
      sum.Y += item.Y;
    }
    return sum;
  }
}
