Skip to content

Commit

Permalink
checkCode
Browse files Browse the repository at this point in the history
  • Loading branch information
gino-m committed Sep 10, 2023
1 parent bba7ed9 commit b974973
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import kotlin.math.abs
import kotlin.math.cos

/**
* Returns the value shifted left [n] bits when [n] is positive, or right [-n] bits when negative.]
* Returns the value shifted left [n] bits when [n] is positive, or right [-n] bits when negative.
*/
fun Int.shiftLeft(n: Int) = if (n >= 0) this shl n else this shr abs(n)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ fun LatLng.toPixelCoordinates(zoom: Int): PixelCoordinates {
return PixelCoordinates((x * 256.0).toInt(), (y * 256.0).toInt(), zoom)
}

fun TileCoordinates.toPixelCoordinate(xOffset: Int, yOffset: Int): PixelCoordinates {
return PixelCoordinates(x * 256 + xOffset, y * 256 + yOffset, zoom)
}
fun TileCoordinates.toPixelCoordinate(xOffset: Int, yOffset: Int) =
PixelCoordinates(x * 256 + xOffset, y * 256 + yOffset, zoom)

0 comments on commit b974973

Please sign in to comment.