From 1b484f853061e8577d95205f27e1ebbdbf80ec47 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Mon, 26 Oct 2020 14:05:06 -0400 Subject: Address comments by @schwehr --- src/tsfn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tsfn.cpp') diff --git a/src/tsfn.cpp b/src/tsfn.cpp index fe8f29ed..a0960a66 100644 --- a/src/tsfn.cpp +++ b/src/tsfn.cpp @@ -21,7 +21,7 @@ double pj_tsfn(double phi, double sinphi, double e) { // exp(-asinh(tan(phi))) = 1 / (tan(phi) + sec(phi)) // = cos(phi) / (1 + sin(phi)) good for phi > 0 // = (1 - sin(phi)) / cos(phi) good for phi < 0 - return exp(e * atanh(e * sinphi)) * + return exp(e * atanh(e * sinphi)) * ( sinphi > 0 ? cosphi / (1 + sinphi) : (1 - sinphi) / cosphi ); -- cgit v1.2.3