|
static Complex[] | BrokenCubic (double p, double q, double r) |
| Solutions of the cubic y^3 + p y^2 + q y + r = 0.
|
|
static double[] | Quadratic (double a, double b, double c) |
| Solve the equation ax^2 + bx + c = 0 for two real roots. If solution is complex, return NaN.
|
|
static Complex[] | Quartic (double a, double b, double c, double d) |
| Solve a Quartic of the form: x^4 + a x^3 + b x^2 + c x + d = 0.
|
|
static Complex[] | SolveCubic (double a, double b, double c, double d) |
| Solve ax^3+bx^2+cx+d=0 for x. Calculation of the 3 roots of a cubic equation according to https://en.wikipedia.org/wiki/Cubic_equation#General_cubic_formula Using the complex struct from System.Numerics Visual Studio 2010, .NET version 4.0 (Initial Implementation from https://www.daniweb.com/programming/software-development/code/454493/solving-the-cubic-equation-using-the-complex-struct (added fix for initial C=0)
|
|
◆ BrokenCubic()
static Complex[] GravityEngine2.PolynomialSolver.BrokenCubic |
( |
double | p, |
|
|
double | q, |
|
|
double | r ) |
|
static |
Solutions of the cubic y^3 + p y^2 + q y + r = 0.
From CRC Standard Math Tables, 28th Edition p9.
- Parameters
-
- Returns
DOES not work. Something to do with the choice of cube roots maybe?
◆ Quadratic()
static double[] GravityEngine2.PolynomialSolver.Quadratic |
( |
double | a, |
|
|
double | b, |
|
|
double | c ) |
|
static |
Solve the equation ax^2 + bx + c = 0 for two real roots. If solution is complex, return NaN.
- Parameters
-
- Returns
◆ Quartic()
static Complex[] GravityEngine2.PolynomialSolver.Quartic |
( |
double | a, |
|
|
double | b, |
|
|
double | c, |
|
|
double | d ) |
|
static |
Solve a Quartic of the form: x^4 + a x^3 + b x^2 + c x + d = 0.
CRC Math Handbook. 28th Ed. p 12
- Returns
- array of solutions
◆ SolveCubic()
static Complex[] GravityEngine2.PolynomialSolver.SolveCubic |
( |
double | a, |
|
|
double | b, |
|
|
double | c, |
|
|
double | d ) |
|
static |
The documentation for this class was generated from the following file:
- ge2/GE2/Assets/GravityEngine2/Runtime/Math/PolynomialSolver.cs