From 2560a09c1ba3544895dba1f5eedb4f577138237e Mon Sep 17 00:00:00 2001 From: Andrew Tapay Date: Mon, 23 Apr 2018 08:20:14 -0700 Subject: [PATCH] Fix tangent projection --- s2sphere/sphere.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s2sphere/sphere.py b/s2sphere/sphere.py index eb80971..f80f4ce 100644 --- a/s2sphere/sphere.py +++ b/s2sphere/sphere.py @@ -1481,7 +1481,7 @@ def uv_to_st(cls, u): if cls.PROJECTION == cls.LINEAR_PROJECTION: return 0.5 * (u + 1) elif cls.PROJECTION == cls.TAN_PROJECTION: - return (2 * (1.0 / math.pi)) * (math.atan(u) * math.pi / 4.0) + return (2 * (1.0 / math.pi)) * (math.atan(u) + math.pi / 4.0) elif cls.PROJECTION == cls.QUADRATIC_PROJECTION: if u >= 0: return 0.5 * math.sqrt(1 + 3 * u)