diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-11 10:49:58 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-11 11:18:23 +0100 |
| commit | 94defd1a7212d3ede321515255768b3b726ff948 (patch) | |
| tree | 14888c24c3a461fda1672babd034373559691345 /src/proj_internal.h | |
| parent | dc4acc001e7d5cd1f4d9af49eeb7e3770a1d5637 (diff) | |
| download | PROJ-94defd1a7212d3ede321515255768b3b726ff948.tar.gz PROJ-94defd1a7212d3ede321515255768b3b726ff948.zip | |
pj_phi2(): speed-up computation (and thus inverse ellipsoidal Mercator and LCC)
This does not change the numeric values returned by the method,
as far as I could see on a few samplings.
The tricks used save a call to sin() and atan() at each iteration.
This directly affects speed of inverse Mercator and LCC (among others),
in their ellipsoidal formulation.
Timings on inverse Mercator show a 31% speed-up at mid-latitudes
where pj_phi2() needs 5 iterations, and 24% at latitudes close to 0 or
90deg where it needs one iteration.
Diffstat (limited to 'src/proj_internal.h')
| -rw-r--r-- | src/proj_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proj_internal.h b/src/proj_internal.h index 8f73200d..cca57859 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -825,7 +825,7 @@ double pj_inv_mlfn(projCtx_t *, double, double, double *); double pj_qsfn(double, double, double); double pj_tsfn(double, double, double); double pj_msfn(double, double, double); -double PROJ_DLL pj_phi2(projCtx_t *, double, double); +double PROJ_DLL pj_phi2(projCtx_t *, const double, const double); double pj_qsfn_(double, PJ *); double *pj_authset(double); double pj_authlat(double, double *); |
