From 864d1e33f5dd717642801d300d408669a04ff9a4 Mon Sep 17 00:00:00 2001 From: djes Date: Mon, 11 Jun 2018 23:23:48 +0200 Subject: [PATCH] Optimisation Little optimisation by Michael Vogel, see https://www.purebasic.fr/english/viewtopic.php?p=523247#p523247 --- PBMap.pb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PBMap.pb b/PBMap.pb index fb1b6a9..98019a7 100644 --- a/PBMap.pb +++ b/PBMap.pb @@ -515,7 +515,7 @@ Module PBMap Protected *PBMap.PBMap = PBMaps(Str(MapGadget)) Protected n.d = *PBMap\TileSize * Pow(2.0, Zoom) ; Ensures the longitude to be in the range [-180; 180[ - *Location\Longitude = Mod(Mod(*Coords\x / n * 360.0, 360.0) + 360.0, 360.0) - 180 + *Location\Longitude = Mod((1 + *Coords\x / n) * 360, 360) - 180 ; Mod(Mod(*Coords\x / n * 360.0, 360.0) + 360.0, 360.0) - 180 *Location\Latitude = Degree(ATan(SinH(#PI * (1.0 - 2.0 * *Coords\y / n)))) If *Location\Latitude <= -89 *Location\Latitude = -89 @@ -3141,9 +3141,9 @@ CompilerIf #PB_Compiler_IsMainFile CompilerEndIf -; IDE Options = PureBasic 5.61 (Windows - x64) -; CursorPosition = 2751 -; FirstLine = 2744 +; IDE Options = PureBasic 5.61 (Windows - x86) +; CursorPosition = 517 +; FirstLine = 513 ; Folding = --------------------- ; EnableThread ; EnableXP