public double NumberOfIterationsToConvergence(double x, double y)
 {
     A = this[_g] / (x * this[_gamma].Sqrd());
     B = x * this[_gamma] / this[_v0Mag];
     if (B > 1)
         return double.MinValue;
     if (x > this[_v0Mag] / this[_gamma])
         return double.MinValue;
     double xi1 = 0;
     double xib = Math.Sqrt(1 / B.Sqrd() - 1);
     xi0 = y / x;
     //Solve using an iterative function method
     var t = new SingleVariableEq(eqToSolve);
     int counter;
     Math.Atan(t.IterativeSolver(xi1, -xib, xib, 1.0e-10, 10000, out counter));
     return (double)counter;
 }
 private double SolveUsingIterativeFunction(double x, double y)
 {
     A = this[_g] / (x * this[_gamma].Sqrd());
     B = x * this[_gamma] / this[_v0Mag];
     if (B > 1)
         return double.MinValue;
     if (x > this[_v0Mag] / this[_gamma])
         return double.MinValue;
     double xi1 = 0;
     double xib = Math.Sqrt(1 / B.Sqrd() - 1);
     xi0 = y / x;
     //Solve using an iterative function method
     var t = new SingleVariableEq(eqToSolve);
     int counter;
     return Math.Atan(t.IterativeSolver(xi1, -xib, xib, 1.0e-10, 10000));
 }