Quadratic.realEquation constructor

Quadratic.realEquation({
  1. double a = 1,
  2. double b = 0,
  3. double c = 0,
})

This is an example of a quadratic equation, where the coefficient with the highest degree goes first:

// f(x) = x^2 - 6x + 5
final eq = Quadratic.realEquation(
  a: 2,
  b: -6,
  c: 5,
);

If the coefficients of your polynomial contain complex numbers, consider using the Quadratic.new constructor instead.

Implementation

Quadratic.realEquation({
  double a = 1,
  double b = 0,
  double c = 0,
}) : super.realEquation([a, b, c]);