Added a small and simple test EI.java. and fixed some buggs
This commit is contained in:
parent
bea0632d5d
commit
dbee794932
8 changed files with 150 additions and 53 deletions
|
|
@ -10,6 +10,8 @@ public class Vector2I {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the X value
|
||||
*
|
||||
* @return the x value in the vector
|
||||
*/
|
||||
public int getX(){
|
||||
|
|
@ -17,9 +19,24 @@ public class Vector2I {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the Y value
|
||||
*
|
||||
* @return the y value in the vector
|
||||
*/
|
||||
public int getY(){
|
||||
return y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add to the vectro
|
||||
* @param i The amount to add
|
||||
*/
|
||||
public void add(int i){
|
||||
x += i;
|
||||
y += i;
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return "Vector2I["+x+","+y+"]";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue