public class GraphicsGems
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static double |
EQN_EPS
epsilon value
|
| Constructor and Description |
|---|
GraphicsGems()
Creates a new instance of GraphicsGems
|
| Modifier and Type | Method and Description |
|---|---|
static double |
cbrt(double x)
Returns the cube root
|
static boolean |
IsZero(double x)
true if x is zero w/in tolerance
|
static int |
SolveCubic(double[] c,
double[] s)
Solve a cubic equation
|
static int |
SolveQuadric(double[] c,
double[] s)
Solves a quadric equation
|
static int |
SolveQuadric(double[] c,
double[] s,
int n)
Solve a quadric equation
|
static int |
SolveQuartic(double[] c,
double[] s)
Solves a quartic equation
|
public static final double EQN_EPS
public static double cbrt(double x)
x - the input valuepublic static boolean IsZero(double x)
x - value to testpublic static int SolveCubic(double[] c,
double[] s)
c - array of coefficientss - storage for the resultspublic static int SolveQuadric(double[] c,
double[] s)
c - The coefficients for the equations - Storage for the roots of the equationpublic static int SolveQuadric(double[] c,
double[] s,
int n)
c - coefficient array for the quadrics - storage for the roots of the equationn - offset into the result array, if non-zeropublic static int SolveQuartic(double[] c,
double[] s)
c - array containing the coefficients of the equations - storage for results