mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 09:00:34 +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);
|
||||
h[1] *= (exp(+z) - 1) / z;
|
||||
}
|
||||
else if(sl2) {
|
||||
/* not implemented */
|
||||
else {
|
||||
/* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user