add helpful(?) comment

This commit is contained in:
Daniel Barlow 2024-11-23 12:04:06 +00:00
parent 795e63d773
commit 966026b3e7

View File

@ -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))