Some versions of Python do not allow hypot to have more than 2 arguments.

This commit is contained in:
Don Cross
2024-05-27 18:01:44 -04:00
parent 7c475fcada
commit 9c5f98981a
3 changed files with 3 additions and 3 deletions

View File

@@ -1435,7 +1435,7 @@ def _inverse_terra(ovec: List[float], st: float) -> Observer:
# Start with initial latitude estimate, based on a spherical Earth.
lat = math.atan2(z, p)
count = 0
distanceAu = max(1.0, math.hypot(ovec[0], ovec[1], ovec[2]))
distanceAu = max(1.0, math.sqrt(ovec[0]**2 + ovec[1]**2 + ovec[2]**2))
while True:
count += 1
if count > 10: