k
This commit is contained in:
parent
380415f035
commit
79ae1d0dcc
3 changed files with 27 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue