|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jhu.ece.iacl.jist.structures.vector.Vector2
public class Vector2
The Class Vector2.
Field Summary | |
---|---|
java.lang.Number |
x
The y. |
java.lang.Number |
y
The y. |
Constructor Summary | |
---|---|
Vector2(java.lang.Number[] m)
Instantiates a new vector2. |
|
Vector2(java.lang.Number x,
java.lang.Number y)
Instantiates a new vector2. |
Method Summary | |
---|---|
Vector2 |
add(double a)
Adds the. |
Vector2 |
add(VectorX v)
Adds the. |
Vector2 |
clone()
Clone. |
Vector2 |
div(double a)
Div. |
Vector2 |
div(VectorX v)
Div. |
java.lang.Number |
get(int i)
Gets the. |
java.lang.Number |
getW()
Gets the w. |
java.lang.Number |
getX()
Gets the x. |
java.lang.Number |
getY()
Gets the y. |
java.lang.Number |
getZ()
Gets the z. |
java.lang.Number |
mag()
Mag. |
Vector2 |
mul(double a)
Mul. |
Vector2 |
mul(VectorX v)
Mul. |
Vector2 |
normalize()
Normalize. |
void |
set(java.lang.Number value,
int i)
Sets the. |
void |
set(Vector2 v)
Sets the. |
void |
setW(java.lang.Number w)
Sets the w. |
void |
setX(java.lang.Number x)
Sets the x. |
void |
setY(java.lang.Number y)
Sets the y. |
void |
setZ(java.lang.Number z)
Sets the z. |
int |
size()
Size. |
Vector2 |
sub(double a)
Sub. |
Vector2 |
sub(VectorX v)
Sub. |
java.lang.Number[] |
toArray()
To array. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.Number x
public java.lang.Number y
Constructor Detail |
---|
public Vector2(java.lang.Number[] m)
m
- the mpublic Vector2(java.lang.Number x, java.lang.Number y)
x
- the xy
- the yMethod Detail |
---|
public int size()
VectorX
size
in interface VectorX
public java.lang.Number get(int i)
VectorX
get
in interface VectorX
i
- the i
public java.lang.Number getX()
VectorX
getX
in interface VectorX
public java.lang.Number getY()
VectorX
getY
in interface VectorX
public void setX(java.lang.Number x)
VectorX
setX
in interface VectorX
x
- the new xpublic void setY(java.lang.Number y)
VectorX
setY
in interface VectorX
y
- the new ypublic void setZ(java.lang.Number z)
VectorX
setZ
in interface VectorX
z
- the new zpublic void setW(java.lang.Number w)
VectorX
setW
in interface VectorX
w
- the new wpublic java.lang.Number[] toArray()
VectorX
toArray
in interface VectorX
public Vector2 add(double a)
VectorX
add
in interface VectorX
a
- the a
public Vector2 sub(double a)
VectorX
sub
in interface VectorX
a
- the a
public Vector2 mul(double a)
VectorX
mul
in interface VectorX
a
- the a
public Vector2 div(double a)
VectorX
div
in interface VectorX
a
- the a
public Vector2 add(VectorX v)
VectorX
add
in interface VectorX
v
- the v
public Vector2 sub(VectorX v)
VectorX
sub
in interface VectorX
v
- the v
public Vector2 mul(VectorX v)
VectorX
mul
in interface VectorX
v
- the v
public Vector2 div(VectorX v)
VectorX
div
in interface VectorX
v
- the v
public java.lang.Number getZ()
VectorX
getZ
in interface VectorX
public java.lang.Number getW()
VectorX
getW
in interface VectorX
public void set(Vector2 v)
v
- the vpublic Vector2 clone()
VectorX
clone
in interface VectorX
clone
in class java.lang.Object
public java.lang.Number mag()
VectorX
mag
in interface VectorX
public java.lang.String toString()
toString
in class java.lang.Object
public void set(java.lang.Number value, int i)
VectorX
set
in interface VectorX
value
- the valuei
- the ipublic Vector2 normalize()
VectorX
normalize
in interface VectorX
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |