|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFEJDMath.Vector2
Used to manipulate vertical vectors with 2 elements
Field Summary | |
private double[] |
vect
The coefficients of the vector |
Constructor Summary | |
Vector2()
Makes a new empty vector |
|
Vector2(double x,
double y)
Makes a new vector with the coefficients x,y |
Method Summary | |
Vector2 |
add(Vector2 v)
Returns the vector added to v |
double |
getNum(int a)
Returns the value of the ath coefficient of the vector (1 based as usual in math) |
double |
mult(Vector2 v)
Returns the vector multiplied by v |
void |
setNum(int a,
double val)
Sets the ath coefficient of the vector to val (1 based as usual in math) |
java.lang.String |
toString()
Returns the vector in a mathematical format |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private double[] vect
Constructor Detail |
public Vector2()
public Vector2(double x, double y)
Method Detail |
public double getNum(int a)
public void setNum(int a, double val)
public double mult(Vector2 v)
public Vector2 add(Vector2 v)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |