From 5d8daabe05fdfeecd06da9f6303bb3788846facc Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 4 Nov 2011 18:34:08 -0400 Subject: [PATCH] re-named variables for increased accuracy --- overviewer_core/quadtree.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/overviewer_core/quadtree.py b/overviewer_core/quadtree.py index c0d511a..11c221c 100644 --- a/overviewer_core/quadtree.py +++ b/overviewer_core/quadtree.py @@ -617,23 +617,25 @@ class Tile(object): depth = len(path) # Radius of the world in chunk cols/rows + # (Diameter in X is 2**depth, divided by 2 for a radius, multiplied by + # 2 for 2 chunks per tile. Similarly for Y) xradius = 2**depth yradius = 2*2**depth - x = -xradius - y = -yradius + col = -xradius + row = -yradius xsize = xradius ysize = yradius for p in path: if p in (1,3): - x += xsize + col += xsize if p in (2,3): - y += ysize + row += ysize xsize //= 2 ysize //= 2 - return cls(x, y, path) + return cls(col, row, path) @classmethod def compute_path(cls, col, row, depth):