1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-13 20:27:10 +00:00

fixed camera movement in ESL2

This commit is contained in:
Zeno Rogue
2023-01-07 19:41:42 +01:00
parent f02073a35f
commit 8136d9b554
2 changed files with 7 additions and 11 deletions

View File

@@ -588,7 +588,7 @@ EX hyperpoint esl2_ati(hyperpoint h) {
ld S = sqrt(U) * (a1 > 0 ? 1 : -1);
ld x = -asinh(S);
h = lorentz(0, 3, -x) * lorentz(1, 2, x) * h;
ld y = h[3] ? atanh(h[1] / h[3]) : atanh(h[0] / h[2]);
ld y = h[3]*h[3] > h[2]*h[2] ? atanh(h[1] / h[3]) : atanh(h[0] / h[2]);
h = lorentz(0, 2, -y) * lorentz(1, 3, -y) * h;
ld z = atan2(h[2], h[3]);
return hyperpoint(x, y, z, 0);