1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 03:29:16 +02:00

Fixed broken tile/subdivs/polygon bounds/coordinates

+ do the coordinates left shift in a C++ standard defined way
This commit is contained in:
2020-02-15 11:46:16 +01:00
parent ce043ef8fa
commit 42e4b0769f
3 changed files with 40 additions and 27 deletions

View File

@ -3,14 +3,16 @@
#include <QtGlobal>
#define LS(val, bits) ((qint32)(((quint32)(val))<<(bits)))
inline double toWGS32(qint32 v)
{
return (double)(((double)v / (double)(1U<<31)) * (double)180);
return ((double)v / (double)(1U<<31)) * 180.0;
}
inline double toWGS24(qint32 v)
{
return toWGS32(v<<8);
return toWGS32(LS(v, 8));
}
#endif // GARMIN_H