|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.shlublu.javax.math.Vector2D
Creation : 2002/03/23 Class dedicated to implement 2D vector operations
| Field Summary | |
double |
x
x coordinate |
double |
y
y coordinate |
| Constructor Summary | |
Vector2D()
Empty constructor, init to (.0, .0) |
|
Vector2D(double dblX,
double dblY)
Constructor, init to the given arguments |
|
Vector2D(Vector2D v)
Constructor, init to the given vector |
|
| Method Summary | |
void |
add(Vector2D v)
Add the given vector |
java.lang.Object |
clone()
Return a Vector2D equals() to this one |
void |
divide(double d)
Divide this vector |
boolean |
equals(java.lang.Object o)
True if o is not null, from the Vector2D class without beeing from a subclass, and have the same coordinates in the same order than this. |
void |
equilibrate()
Equilibrate this vector |
Vector2D |
getDifference(Vector2D vToSubstract)
Get the difference vector |
Vector2D |
getDivided(double d)
Get the divided vector corresponding to this one |
Vector2D |
getEquilibrated()
Return an equilibrated vector corresponding to this |
Vector2D |
getNormalized()
Return a normalized vector corresponding to this |
Point2D |
getPoint()
Get the Point corresponding to this Vector |
Vector2D |
getProduct(double d)
Get the multiplied vector corresponding to this one |
Vector2D |
getProjected(Vector2D v)
Get the projection on this of the given vector |
Vector2D |
getSum(Vector2D vToAdd)
Get the sum vector |
void |
multiply(double d)
Multiply this vector |
double |
norm()
Get this vector's norm |
void |
normalize()
Normalize this vector |
Vector2D |
projectOn(Vector2D v)
Get the projection on the given vector of this |
double |
scalarProduct(Vector2D v)
Get the scalar (or dot) product with the given vector |
void |
substract(Vector2D v)
Substract the given vector |
java.lang.String |
toString()
Get this vector as a string |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double x
public double y
| Constructor Detail |
public Vector2D()
public Vector2D(double dblX,
double dblY)
public Vector2D(Vector2D v)
| Method Detail |
public java.lang.String toString()
toString in interface VectortoString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface Vectorequals in class java.lang.Objectpublic java.lang.Object clone()
clone in interface Vectorclone in class java.lang.Objectpublic Point2D getPoint()
public double norm()
norm in interface Vectorpublic void normalize()
normalize in interface Vectorpublic Vector2D getNormalized()
public void equilibrate()
equilibrate in interface Vectorpublic Vector2D getEquilibrated()
public void multiply(double d)
multiply in interface Vectorpublic Vector2D getProduct(double d)
public void divide(double d)
divide in interface Vectorpublic Vector2D getDivided(double d)
public void add(Vector2D v)
public Vector2D getSum(Vector2D vToAdd)
public void substract(Vector2D v)
public Vector2D getDifference(Vector2D vToSubstract)
public double scalarProduct(Vector2D v)
public Vector2D getProjected(Vector2D v)
public Vector2D projectOn(Vector2D v)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||