Calc.SolveQuadric Method

Solves the quadric equation c2*x^2 + c1 * x+ c0 = 0 for x.
public static int SolveQuadric( 
   double c2
   double c1
   double c0
   List<double> s
   double zerotol = Calc.Epsilon 
)

Parameters

c2
double

Coefficient 1.

c1
double

Coefficient 2.

c0
double

Coefficient 3.

s
List<double>

An array where solutions are pushed.

zerotol
double

If discriminant is closer to zero than this value, the equation has one solution (allowing for slighly negative discriminants)

Return Value

int

The number of solutions found (=number of numbers pushed to array)

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition