mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-16 06:37:38 +00:00
clamp hdist just in case
This commit is contained in:
@@ -511,7 +511,7 @@ double hdist(const hyperpoint& h1, const hyperpoint& h2) {
|
|||||||
case gcHyperbolic:
|
case gcHyperbolic:
|
||||||
return 2 * asinh(sqrt(iv) / 2);
|
return 2 * asinh(sqrt(iv) / 2);
|
||||||
case gcSphere:
|
case gcSphere:
|
||||||
return 2 * asin(sqrt(iv) / 2);
|
return 2 * asin_auto_clamp(sqrt(iv) / 2);
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user