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

lie_exp approximation for other geometries

This commit is contained in:
Zeno Rogue 2022-05-06 02:50:30 +02:00
parent 1c907be9da
commit 418eb072dc

View File

@ -2976,8 +2976,15 @@ EX hyperpoint lie_exp(hyperpoint h) {
z = h[2] * log(3); z = h[2] * log(3);
h[1] *= (exp(+z) - 1) / z; h[1] *= (exp(+z) - 1) / z;
} }
else if(sl2) { else {
/* not implemented */ /* not implemented -- approximate for now */
const int steps = 16;
h /= (1<<steps);
h[3] = 1;
normalize(h);
transmatrix T = eupush(h);
for(int i=0; i<16; i++) T = T * T;
h = tC0(T);
} }
return h; return h;
} }