diff options
| author | Micah Cochran <micahcochran@users.noreply.github.com> | 2016-05-28 11:26:35 -0500 |
|---|---|---|
| committer | Micah Cochran <micahcochran@users.noreply.github.com> | 2016-05-28 11:26:35 -0500 |
| commit | 3043b2f7fcf4471983c8d4472b17ccf9df1710c8 (patch) | |
| tree | 94e63e8367dad31a6f0fe1703050d0ad79340785 /src/PJ_ocea.c | |
| parent | a112ea3172e89230fa307567be3d70e286b1eeb5 (diff) | |
| download | PROJ-3043b2f7fcf4471983c8d4472b17ccf9df1710c8.tar.gz PROJ-3043b2f7fcf4471983c8d4472b17ccf9df1710c8.zip | |
Change math constants, similar to PR #372. Use M_ namespace with the de facto standard M_PI and its ilk. Change names that are widely used in the project to be in the M_ namespace, so HALFPI becomes M_HALFPI. HALFPI is #defined as M_PI_2 (the defacto standard name). #defines _USE_MATH_DEFINES for MS Visual Studio (I didn't personally test this part, but Appveyor will not build otherwise).
Diffstat (limited to 'src/PJ_ocea.c')
| -rw-r--r-- | src/PJ_ocea.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PJ_ocea.c b/src/PJ_ocea.c index 817f0ce6..2a3235c8 100644 --- a/src/PJ_ocea.c +++ b/src/PJ_ocea.c @@ -23,7 +23,7 @@ static XY s_forward (LP lp, PJ *P) { /* Spheroidal, forward */ t = cos(lp.lam); xy.x = atan((tan(lp.phi) * Q->cosphi + Q->sinphi * xy.y) / t); if (t < 0.) - xy.x += PI; + xy.x += M_PI; xy.x *= Q->rtk; xy.y = Q->rok * (Q->sinphi * sin(lp.phi) - Q->cosphi * cos(lp.phi) * xy.y); return xy; @@ -95,7 +95,7 @@ PJ *PROJECTION(ocea) { /*Equation 9-2 page 80 (http://pubs.usgs.gov/pp/1395/report.pdf)*/ Q->sinphi = atan(-cos(Q->singam - lam_1) / tan(phi_1)); } - P->lam0 = Q->singam + HALFPI; + P->lam0 = Q->singam + M_HALFPI; Q->cosphi = cos(Q->sinphi); Q->sinphi = sin(Q->sinphi); Q->cosgam = cos(Q->singam); |
