1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-26 01:50:36 +00:00

fixed incorrect sign and one branch in twist::formula_exp

This commit is contained in:
Zeno Rogue 2024-07-15 13:27:00 +02:00
parent 228bc345ed
commit 2be462c62e

View File

@ -2688,7 +2688,7 @@ EX namespace twist {
ld xy = sr * sinh(k); ld xy = sr * sinh(k);
ld zw = cr * sinh(k); ld zw = cr * sinh(k);
return shiftpoint(hyperpoint(K*xy * cos(beta), K*xy * sin(beta), zw, cosh(k)), u); return shiftpoint(hyperpoint(K*xy * cos(beta), K*xy * sin(beta), zw, cosh(k)), -u);
} }
else { else {
@ -2706,6 +2706,9 @@ EX namespace twist {
ld xy = sr * sin(k); ld xy = sr * sin(k);
ld zw = cr * sin(k); ld zw = cr * sin(k);
if(sl2)
return shiftpoint(hyperpoint(K*xy * cos(beta), K*xy * sin(beta), zw, cos(k)), -u + get_shift_cycles(k));
return shiftpoint(hyperpoint(K*xy * cos(u+beta), K*xy * sin(u+beta), zw * cos(u) - cos(k) * sin(u), zw * sin(u) + cos(k)*cos(u)), 0); return shiftpoint(hyperpoint(K*xy * cos(u+beta), K*xy * sin(u+beta), zw * cos(u) - cos(k) * sin(u), zw * sin(u) + cos(k)*cos(u)), 0);
} }
} }