|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.farafin.snEADy.communication.D_Vec2D
public final class D_Vec2D
2-dimensional vector datatype for calculating on the playfield
| Field Summary | |
|---|---|
int |
x
Comment for x |
int |
y
Comment for y |
| Constructor Summary | |
|---|---|
D_Vec2D()
default - constructor |
|
D_Vec2D(D_Vec2D vec)
copy - concstructor |
|
D_Vec2D(int y,
int x)
create - constructor |
|
| Method Summary | |
|---|---|
void |
add(D_Vec2D a)
|
static D_Vec2D |
add(D_Vec2D a,
D_Vec2D b)
|
void |
add(int y,
int x)
add the values to the vector |
java.lang.Object |
clone()
|
void |
copyOnMe(D_Vec2D vec)
copys all data to the lokal instance. there is no new Instance created |
int |
dist(D_Vec2D vec)
manhatten distance: d = dy + dx |
boolean |
equals(D_Vec2D vec)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int y
y
public int x
x
| Constructor Detail |
|---|
public D_Vec2D()
public D_Vec2D(int y,
int x)
y - x - public D_Vec2D(D_Vec2D vec)
vec - | Method Detail |
|---|
public java.lang.Object clone()
clone in class java.lang.Object
public static D_Vec2D add(D_Vec2D a,
D_Vec2D b)
a - Vector ab - Vector b
public void add(D_Vec2D a)
a - non static addition to the given vector
public void add(int y,
int x)
y - add y (line)x - add x (row)public void copyOnMe(D_Vec2D vec)
vec - public int dist(D_Vec2D vec)
vec -
public boolean equals(D_Vec2D vec)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||