|
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.Vector2
Simple representation of a vector in a 2D space.
Represented as 2 double
s.
Field Summary | |
double |
x0
First coordinate of this vector. |
double |
x1
Second coordinate of this vector. |
Constructor Summary | |
Vector2(double[] coords)
Constructor from an array containing 2 double s. |
|
Vector2(double a0,
double a1)
Constructor from 2 double s. |
Method Summary | |
static Vector2 |
add(Vector2 a,
Vector2 b)
Returns a Vector2 c such as c = a + b. |
static Vector2 |
mul(double k,
Vector2 a)
Multiplication of a vector by a scalar ; returns a vector b such as b = k a. |
static Vector2 |
mul(Matrix2 M,
Vector2 a)
Multiplication of a vector by a matrix ; returns a vector b such as b = M a. |
static Vector2 |
negate(Vector2 a)
Returns a Vector2 b such as b = -a. |
static double |
norm(Vector2 v)
Returns the norm of the vector passed in parameter. |
static Vector2 |
sub(Vector2 a,
Vector2 b)
Returns a Vector2 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
Constructor Detail |
public Vector2(double a0, double a1)
double
s.
public Vector2(double[] coords)
double
s.
java.lang.IllegalArgumentException
- if coords.length != 2
.Method Detail |
public java.lang.String toString()
(x0, x1)
.
toString
in class java.lang.Object
public static double norm(Vector2 v)
public static Vector2 mul(Matrix2 M, Vector2 a)
public static Vector2 mul(double k, Vector2 a)
public static Vector2 sub(Vector2 a, Vector2 b)
Vector2
c such as c = a - b.
public static Vector2 add(Vector2 a, Vector2 b)
Vector2
c such as c = a + b.
public static Vector2 negate(Vector2 a)
Vector2
b such as b = -a.
|
JEphem site jephem API Build classes |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |