summaryrefslogtreecommitdiffstats
path: root/examples/embedded/lightmaps
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-06-21 16:27:12 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-07-07 18:08:41 +0000
commit6d77ed23efe2a98a4d4290eaac7d87812d4b110c (patch)
treed8844f455aeb9b337ceccfd2b929e45abce4bf03 /examples/embedded/lightmaps
parent85a793075cd2b9b4c0798b5fbf530f8b2951af83 (diff)
Call sinh() rather than implementing it using exp()
Change-Id: I8dda2f94524b19bcdec640e7541b04d46a6c3941 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'examples/embedded/lightmaps')
-rw-r--r--examples/embedded/lightmaps/slippymap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/embedded/lightmaps/slippymap.cpp b/examples/embedded/lightmaps/slippymap.cpp
index 0bd5f44075..ff43261700 100644
--- a/examples/embedded/lightmaps/slippymap.cpp
+++ b/examples/embedded/lightmaps/slippymap.cpp
@@ -81,7 +81,7 @@ qreal latitudeFromTile(qreal ty, int zoom)
{
qreal zn = static_cast<qreal>(1 << zoom);
qreal n = M_PI - 2 * M_PI * ty / zn;
- return qRadiansToDegrees(atan(0.5 * (exp(n) - exp(-n))));
+ return qRadiansToDegrees(atan(sinh(n)));
}