From 966026b3e7691b70802f3b2b3654c985f0a0e347 Mon Sep 17 00:00:00 2001 From: Daniel Barlow <dan@telent.net> Date: Sat, 23 Nov 2024 12:04:06 +0000 Subject: [PATCH] add helpful(?) comment --- frontend/src/TileMap.elm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/TileMap.elm b/frontend/src/TileMap.elm index ad08064..59811f1 100644 --- a/frontend/src/TileMap.elm +++ b/frontend/src/TileMap.elm @@ -59,14 +59,13 @@ pixelsToCoord z (x,y) = reflect : Coord -> Coord reflect c = Coord -c.x -c.y --- translate : a -> a -> a +-- used for Coords and for TileNumbers translate base offset = { x = (base.x + offset.x), y = (base.y + offset.y) } translatePixels : Coord -> ZoomLevel -> (Int, Int) -> Coord translatePixels old z (x, y) = translate old (pixelsToCoord z (x, y)) - tileCovering : Coord -> ZoomLevel -> TileNumber tileCovering c z = TileNumber (truncate (toFloat (2 ^ z) * c.x)) (truncate (toFloat (2 ^ z) * c.y))