diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-08-24 17:00:32 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2018-08-24 20:41:06 +0200 |
| commit | 62b81642ae5226d8aefcc1da7e30cc2d2e65e697 (patch) | |
| tree | b610279080f54bb06eec9e435a15976724926c6e /src | |
| parent | 502bc55cf4f8dd4b9f3cc1a06d7f52c9ba1e9ff5 (diff) | |
| download | PROJ-62b81642ae5226d8aefcc1da7e30cc2d2e65e697.tar.gz PROJ-62b81642ae5226d8aefcc1da7e30cc2d2e65e697.zip | |
Improve numerical precision of inverse spherical mercator
Complements f2b3604
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_merc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PJ_merc.c b/src/PJ_merc.c index 46cd4b3d..1998234e 100644 --- a/src/PJ_merc.c +++ b/src/PJ_merc.c @@ -57,7 +57,7 @@ static LP e_inverse (XY xy, PJ *P) { /* Ellipsoidal, inverse */ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */ LP lp = {0.0,0.0}; - lp.phi = M_HALFPI - 2. * atan(exp(-xy.y / P->k0)); + lp.phi = atan(sinh(xy.y / P->k0)); lp.lam = xy.x / P->k0; return lp; } |
