|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectVector
Class Vector Version 2
Constructor Summary | |
Vector()
Constructor. |
|
Vector(double x,
double y)
Constructor. |
|
Vector(float len,
double ang)
Constructor. |
|
Vector(java.awt.geom.Point2D s)
Constructor. |
Method Summary | |
boolean |
equal(Vector vV)
Determines wheather this vector is equal to other vector. |
java.awt.geom.Point2D |
getSpets()
Returns spets of this vector. |
double |
getx()
Retrieves the coordinate x of this vector. |
double |
gety()
Retrieves the coordinate y of this vector. |
double |
magnitud()
Returns magnitud of this vector. |
void |
multPorEscalar(double m)
Mulitplies vector with scalar. |
static double |
productoPunto(Vector a,
Vector b)
Creates "producto punto" multiplying two vectors |
void |
restarLe(Vector vV)
Subtracts vector from this vector. |
static Vector |
restVectores(Vector a,
Vector b)
Creates new vector subtracting one vector from other vector |
void |
rotar(double ang)
Rotates vector to the left certain number of radians. |
void |
set(double x,
double y)
Sets the spets of this vector to coordinates x, y. |
void |
set(java.awt.geom.Point2D xy)
Sets the spets of this vector to coordinates xy |
void |
sumarLe(Vector vV)
Adds vector to this vector. |
static Vector |
sumaVectores(Vector a,
Vector b)
Creates new vector summing up two otheres |
java.lang.String |
toString()
Retrieves this vector in format String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Vector()
public Vector(java.awt.geom.Point2D s)
s
- Initializes spetspublic Vector(double x, double y)
x
- Initializes spetsy
- Initializes spetspublic Vector(float len, double ang)
len
- Initializes spetsang
- Initializes spetsMethod Detail |
public void set(double x, double y)
x
- -y
- -public void set(java.awt.geom.Point2D xy)
xy
- -public void sumarLe(Vector vV)
vV
- the vector to be added.public void restarLe(Vector vV)
vV
- the vector to be added.public void multPorEscalar(double m)
m
- the scalar.public void rotar(double ang)
ang
- the certain number of radians.public java.lang.String toString()
public boolean equal(Vector vV)
vV
- the other vector
public static Vector sumaVectores(Vector a, Vector b)
a
- & b the two vectors to be added upb
- & a the two vectors to be added up
public static Vector restVectores(Vector a, Vector b)
a
- other vectorb
- one vector
public static double productoPunto(Vector a, Vector b)
a
- & b the two vectors to be multipliedb
- & a the two vectors to be multiplied
public double magnitud()
public java.awt.geom.Point2D getSpets()
public double getx()
public double gety()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |