From caccc265546d3f707112ed74e0a1e5543a97152e Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Thu, 3 Oct 2013 16:18:07 +0000 Subject: fix windows build for healpix (#223) git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2386 4e78687f-474d-0410-85f9-8d5e500ac6b2 --- src/PJ_healpix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/PJ_healpix.c b/src/PJ_healpix.c index 5c07700d..2cc918bb 100644 --- a/src/PJ_healpix.c +++ b/src/PJ_healpix.c @@ -247,11 +247,12 @@ LP healpix_sphere_inverse(XY xy) { lp.phi = asin(8.0*y/(3.0*PI)); } else if (fabsl(y) < PI/2.0) { double cn = floor(2.0*x/PI + 2.0); + double xc, tau; if (cn >= 4) { cn = 3; } - double xc = -3.0*PI/4.0 + (PI/2.0)*cn; - double tau = 2.0 - 4.0*fabsl(y)/PI; + xc = -3.0*PI/4.0 + (PI/2.0)*cn; + tau = 2.0 - 4.0*fabsl(y)/PI; lp.lam = xc + (x - xc)/tau; lp.phi = pj_sign(y)*asin(1.0 - pow(tau , 2.0)/3.0); } else { -- cgit v1.2.3