Helper for map tile calculations