aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_eck4.c
diff options
context:
space:
mode:
authorAaron Puchert <aaron.puchert@sap.com>2018-01-09 20:32:08 +0100
committerAaron Puchert <aaron.puchert@sap.com>2018-01-09 20:32:08 +0100
commitf7a1fe14454b091eecb5fd3e33ff73796a726da1 (patch)
treeb3d9db4f7072429774ce55f68a033b7ae16fad96 /src/PJ_eck4.c
parent47953f0a93cd90d0d52b74f2b2705516f018b2f1 (diff)
downloadPROJ-f7a1fe14454b091eecb5fd3e33ff73796a726da1.tar.gz
PROJ-f7a1fe14454b091eecb5fd3e33ff73796a726da1.zip
Remove or use unused macros
Some macros seemed to be leftover from earlier code, so I removed them. Others seemed like they should have been used, but weren't. There should be no functional change, except the following: in floating- point arithmetic, x / y is not the same as x * (1.0 / y). It can be argued that using the multiplication is significantly faster, and the algorithm is approximative anyway. Otherwise, the constants are obviously not required. Also fixes one location in PJ_aitoff.c, where an enumeration value should have been used.
Diffstat (limited to 'src/PJ_eck4.c')
-rw-r--r--src/PJ_eck4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PJ_eck4.c b/src/PJ_eck4.c
index c3e1b677..a95c10b5 100644
--- a/src/PJ_eck4.c
+++ b/src/PJ_eck4.c
@@ -44,9 +44,9 @@ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */
LP lp = {0.0,0.0};
double c;
- lp.phi = aasin(P->ctx,xy.y / C_y);
+ lp.phi = aasin(P->ctx,xy.y * RC_y);
lp.lam = xy.x / (C_x * (1. + (c = cos(lp.phi))));
- lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) / C_p);
+ lp.phi = aasin(P->ctx,(lp.phi + sin(lp.phi) * (c + 2.)) * RC_p);
return lp;
}