|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.jcurl.math.MathVec
public final class MathVec
Helper class that brings some (2D-)vector artihmetics.
| Method Summary | |
|---|---|
static double |
abs2D(Point2D a)
|
static Point2D |
add(Point2D a,
Point2D b,
Point2D c)
|
static Point2D |
ensureInstance(Point2D template,
Point2D c)
Ensure c isn't null, if so create a new instance of the
type of template. |
static double[] |
gauss(double[][] a,
double[] b,
double[] x)
Solve a linear equation of the form a*x=b. |
(package private) static boolean |
isInside(double x,
double a,
double b,
boolean allowSwap)
Helper to check (inclusive) interval containment. |
static double[] |
mult(double fact,
double[] a,
double[] b)
|
static Point2D |
mult(double fact,
Point2D a,
Point2D b)
|
static Point2D |
norm(Point2D a,
Point2D dst)
|
static void |
rotate(AffineTransform t,
double vx,
double vy)
TUNE JDK 1.6 brings an optimized AffineTransform.rotate(double) |
static double |
scal(double[] a,
double[] b)
|
static double |
scal(Point2D a,
Point2D b)
|
static double |
sqr(double a)
|
static Point2D |
sub(Point2D a,
Point2D b,
Point2D dst)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final double abs2D(Point2D a)
public static final Point2D add(Point2D a,
Point2D b,
Point2D c)
public static final Point2D ensureInstance(Point2D template,
Point2D c)
null, if so create a new instance of the
type of template.
template - c -
c or
template.getClass().newInstance()
public static final double[] gauss(double[][] a,
double[] b,
double[] x)
See Numerische Mathematik, H. R. Schwarz, B. G. Teubner Verlag, 1998, S.22f.
a - coefficient matrix. Attention! All fields a[i][j] are
overwritten!b - constant vector. Attention! All fields b[i] are overwritten!x - solution (max be null)
static final boolean isInside(double x,
double a,
double b,
boolean allowSwap)
Double.NaN etc.
x - a - b - allowSwap - may a > b?
x within a and b?
public static final double[] mult(double fact,
double[] a,
double[] b)
public static final Point2D mult(double fact,
Point2D a,
Point2D b)
public static final Point2D norm(Point2D a,
Point2D dst)
public static final void rotate(AffineTransform t,
double vx,
double vy)
AffineTransform.rotate(double)
public static final double scal(double[] a,
double[] b)
public static final double scal(Point2D a,
Point2D b)
public static final double sqr(double a)
public static final Point2D sub(Point2D a,
Point2D b,
Point2D dst)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||