mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
lie_exp approximation for other geometries
This commit is contained in:
parent
1c907be9da
commit
418eb072dc
11
hypgraph.cpp
11
hypgraph.cpp
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user