From 3043b2f7fcf4471983c8d4472b17ccf9df1710c8 Mon Sep 17 00:00:00 2001 From: Micah Cochran Date: Sat, 28 May 2016 11:26:35 -0500 Subject: 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). --- src/PJ_sconics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/PJ_sconics.c') diff --git a/src/PJ_sconics.c b/src/PJ_sconics.c index 2bf2213b..1d85b0a9 100644 --- a/src/PJ_sconics.c +++ b/src/PJ_sconics.c @@ -169,7 +169,7 @@ static PJ *setup(PJ *P, int type) { Q->n = sin (Q->sig); Q->c2 = cos (del); Q->c1 = 1./tan (Q->sig); - if (fabs (del = P->phi0 - Q->sig) - EPS10 >= HALFPI) + if (fabs (del = P->phi0 - Q->sig) - EPS10 >= M_HALFPI) E_ERROR(-43); Q->rho_0 = Q->c2 * (Q->c1 - tan (del)); break; -- cgit v1.2.3