|
JEphem site jephem API Build classes |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tig.maths.Vector3
Simple representation of a vector in a 3D space, based on double
s.
Represented as 3 double
s.
Field Summary | |
double |
x0
First coordinate of this vector. |
double |
x1
Second coordinate of this vector. |
double |
x2
Third coordinate of this vector. |
Constructor Summary | |
Vector3(double[] coords)
Constructor from an array containing 3 double s. |
|
Vector3(double a0,
double a1,
double a2)
Constructor from 3 double s. |
Method Summary | |
static Vector3 |
add(Vector3 a,
Vector3 b)
Returns a Vector3 c such as c = a + b. |
static Vector3 |
doClone(Vector3 a)
Returns a copy of a Vector3 . |
static Vector3 |
mul(double k,
Vector3 a)
Multiplication of a vector by a scalar ; returns a vector b such as b = k a. |
static Vector3 |
mul(Matrix3 M,
Vector3 a)
Multiplication of a vector by a matrix ; returns a vector b such as b = M a. |
static Vector3 |
negate(Vector3 a)
Returns a Vector3 b such as b = -a. |
static double |
norm(Vector3 v)
Returns the norm of the vector passed in parameter. |
static Vector3 |
sub(Vector3 a,
Vector3 b)
Returns a Vector3 c such as c = a - b. |
java.lang.String |
toString()
Returns a String representation of this Vector. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double x0
public double x1
public double x2
Constructor Detail |
public Vector3(double a0, double a1, double a2)
double
s.
public Vector3(double[] coords)
double
s.
java.lang.IllegalArgumentException
- if coords.length != 3
.Method Detail |
public java.lang.String toString()
(x0, x1, x2)
.
toString
in class java.lang.Object
public static double norm(Vector3 v)
public static Vector3 mul(Matrix3 M, Vector3 a)
public static Vector3 mul(double k, Vector3 a)
public static Vector3 sub(Vector3 a, Vector3 b)
Vector3
c such as c = a - b.
public static Vector3 add(Vector3 a, Vector3 b)
Vector3
c such as c = a + b.
public static Vector3 negate(Vector3 a)
Vector3
b such as b = -a.
public static Vector3 doClone(Vector3 a)
Vector3
.
|
JEphem site jephem API Build classes |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |