From 6bc5d138bbf38e0de339dad923708d12534e3e57 Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Wed, 4 Apr 2007 17:39:10 +0000 Subject: [PATCH] added comments --- src/ei/game/scene/Map.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ei/game/scene/Map.java b/src/ei/game/scene/Map.java index 4d9e2d6..d78753e 100644 --- a/src/ei/game/scene/Map.java +++ b/src/ei/game/scene/Map.java @@ -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);