1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

clamp hdist just in case

This commit is contained in:
Zeno Rogue 2018-05-01 19:35:09 +02:00
parent 47f0cc968f
commit 1346583a7c

View File

@ -511,7 +511,7 @@ double hdist(const hyperpoint& h1, const hyperpoint& h2) {
case gcHyperbolic:
return 2 * asinh(sqrt(iv) / 2);
case gcSphere:
return 2 * asin(sqrt(iv) / 2);
return 2 * asin_auto_clamp(sqrt(iv) / 2);
default:
return 0;
}