aboutsummaryrefslogtreecommitdiff
path: root/src/aasincos.c
diff options
context:
space:
mode:
authorMicah Cochran <micahcochran@users.noreply.github.com>2016-05-28 11:26:35 -0500
committerMicah Cochran <micahcochran@users.noreply.github.com>2016-05-28 11:26:35 -0500
commit3043b2f7fcf4471983c8d4472b17ccf9df1710c8 (patch)
tree94e63e8367dad31a6f0fe1703050d0ad79340785 /src/aasincos.c
parenta112ea3172e89230fa307567be3d70e286b1eeb5 (diff)
downloadPROJ-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/aasincos.c')
-rw-r--r--src/aasincos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/aasincos.c b/src/aasincos.c
index 6f39478e..7cb6bd89 100644
--- a/src/aasincos.c
+++ b/src/aasincos.c
@@ -11,7 +11,7 @@ aasin(projCtx ctx,double v) {
if ((av = fabs(v)) >= 1.) {
if (av > ONE_TOL)
pj_ctx_set_errno( ctx, -19 );
- return (v < 0. ? -HALFPI : HALFPI);
+ return (v < 0. ? -M_HALFPI : M_HALFPI);
}
return asin(v);
}
@@ -23,7 +23,7 @@ aacos(projCtx ctx, double v) {
if ((av = fabs(v)) >= 1.) {
if (av > ONE_TOL)
pj_ctx_set_errno( ctx, -19 );
- return (v < 0. ? PI : 0.);
+ return (v < 0. ? M_PI : 0.);
}
return acos(v);
}