This commit is contained in:
Jesper Lundin 2007-04-16 13:25:25 +00:00
parent 380415f035
commit 79ae1d0dcc
3 changed files with 27 additions and 5 deletions

View file

@ -40,10 +40,10 @@ public class Map {
* @param y y pixels
* @return The pos thats in the coordinates
*/
public Vector2i getPosByPixel(float x, float y){
public static Vector2i getPosByPixel(float x, float y){
x = x/POS_SIZE;
y = y/POS_SIZE;
return new Vector2i((int)x,(int)y);
return new Vector2i((int)x, (int)y);
}
/**
@ -52,7 +52,7 @@ public class Map {
* @param y y pos
* @return The coordinate of the pos
*/
public Vector2f getPixelByPos(int x, int y){
public static Vector2f getPixelByPos(int x, int y){
float xf = (POS_SIZE*x);
float yf = (POS_SIZE*y);
return new Vector2f(xf,yf);