Cubic.realEquation constructor
These are examples of cubic equations, where the coefficient with the highest degree goes first:
// f(x) = 2x^3 + x^2 + 5
final eq = Cubic.fromReal(
a: 2,
b: 1,
d: 5,
);
If the coefficients of your polynomial contain complex numbers, consider using the Cubic.new constructor instead.
Implementation
Cubic.realEquation({
double a = 1,
double b = 0,
double c = 0,
double d = 0,
}) : super.realEquation([a, b, c, d]);