public class QuadraticRoot extends java.lang.Object implements PolyRootSolver
| Constructor and Description |
|---|
QuadraticRoot() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Number> |
solve(Polynomial polynomial)
Solve \(ax^2 + bx + c = 0\).
|
public java.util.List<java.lang.Number> solve(Polynomial polynomial)
solve in interface PolyRootSolverpolynomial - a quadratic equation to be solvedjava.lang.IllegalArgumentException - if the polynomial degree is not 2