EditorMapa2D.Setor.ConvertPoint C# (CSharp) Method

ConvertPoint() public static method

public static ConvertPoint ( int pos, int tileW, int tileH ) : Point
pos int
tileW int
tileH int
return Point
        public static Point ConvertPoint(int pos, int tileW, int tileH)
        {
            Point p = new Point();

            int y = pos / tileH;

            int x = pos < tileW ? pos : pos - (tileW * y);

            p.X = x * tileW;
            p.Y = y * tileH;

            return p;
        }