add helpful(?) comment
This commit is contained in:
parent
795e63d773
commit
966026b3e7
@ -59,14 +59,13 @@ pixelsToCoord z (x,y) =
|
|||||||
reflect : Coord -> Coord
|
reflect : Coord -> Coord
|
||||||
reflect c = Coord -c.x -c.y
|
reflect c = Coord -c.x -c.y
|
||||||
|
|
||||||
-- translate : a -> a -> a
|
-- used for Coords and for TileNumbers
|
||||||
translate base offset =
|
translate base offset =
|
||||||
{ x = (base.x + offset.x), y = (base.y + offset.y) }
|
{ x = (base.x + offset.x), y = (base.y + offset.y) }
|
||||||
|
|
||||||
translatePixels : Coord -> ZoomLevel -> (Int, Int) -> Coord
|
translatePixels : Coord -> ZoomLevel -> (Int, Int) -> Coord
|
||||||
translatePixels old z (x, y) = translate old (pixelsToCoord z (x, y))
|
translatePixels old z (x, y) = translate old (pixelsToCoord z (x, y))
|
||||||
|
|
||||||
|
|
||||||
tileCovering : Coord -> ZoomLevel -> TileNumber
|
tileCovering : Coord -> ZoomLevel -> TileNumber
|
||||||
tileCovering c z =
|
tileCovering c z =
|
||||||
TileNumber (truncate (toFloat (2 ^ z) * c.x)) (truncate (toFloat (2 ^ z) * c.y))
|
TileNumber (truncate (toFloat (2 ^ z) * c.x)) (truncate (toFloat (2 ^ z) * c.y))
|
||||||
|
Loading…
Reference in New Issue
Block a user