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