1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-09 10:14:16 +00:00

product:: works with Euclidean

This commit is contained in:
Zeno Rogue
2019-11-28 23:30:29 +01:00
parent 5add972bdd
commit f3c97f9342
4 changed files with 24 additions and 5 deletions

View File

@@ -373,6 +373,7 @@ EX ld zlevel(const hyperpoint &h) {
if(sl2) return sqrt(-intval(h, Hypc));
else if(translatable) return h[LDIM];
else if(sphere) return sqrt(intval(h, Hypc));
else if(in_e2xe()) return log(h[2]);
else if(prod) return log(sqrt(abs(intval(h, Hypc)))); /* abs works with both underlying spherical and hyperbolic */
else return (h[LDIM] < 0 ? -1 : 1) * sqrt(-intval(h, Hypc));
}