1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-21 08:00:25 +00:00

fixed orthogonal_move for points which are already moved

This commit is contained in:
Zeno Rogue 2020-06-03 16:11:59 +02:00
parent 8443095d47
commit 4b946136f0

View File

@ -575,7 +575,7 @@ EX hyperpoint orthogonal_move(const hyperpoint& h, ld z) {
if(nil) return nisot::translate(h) * cpush0(2, z); if(nil) return nisot::translate(h) * cpush0(2, z);
if(translatable) return hpxy3(h[0], h[1], h[2] + z); if(translatable) return hpxy3(h[0], h[1], h[2] + z);
ld u = 1; ld u = 1;
if(h[2]) z += asin_auto(h[2]), u /= acos_auto(z); if(h[2]) z += asin_auto(h[2]), u /= cos_auto(asin_auto(h[2]));
u *= cos_auto(z); u *= cos_auto(z);
return hpxy3(h[0] * u, h[1] * u, sinh(z)); return hpxy3(h[0] * u, h[1] * u, sinh(z));
} }