added comments

This commit is contained in:
Ziver Koc 2007-04-04 17:39:10 +00:00
parent 1208973646
commit 6bc5d138bb

View file

@ -37,14 +37,24 @@ public class Map {
}
}
/**
* Returns the pos of the map by the pixel
* @param x x pixels
* @param y y pixels
* @return The pos thats in the coordinates
*/
public Vector2i getPosByPixel(float x, float y){
System.out.println("DOWN: "+x+"-"+y);
x = x/POS_SIZE;
y = y/POS_SIZE;
System.out.println("DOWN: "+x+"-"+y);
return new Vector2i((int)x,(int)y);
}
/**
* The coordinate of the map pos
* @param x x pos
* @param y y pos
* @return The coordinate of the pos
*/
public Vector2f getPixelByPos(float x, float y){
x = (int)(POS_SIZE*x*1.2f);
y = (int)(POS_SIZE*y*1.2f);