mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-30 03:50:34 +00:00
fixed direct_exp in S2xE
This commit is contained in:
parent
4ce821bf7a
commit
fdcba734c9
@ -1614,7 +1614,7 @@ EX namespace product {
|
|||||||
EX hyperpoint direct_exp(hyperpoint h) {
|
EX hyperpoint direct_exp(hyperpoint h) {
|
||||||
hyperpoint res;
|
hyperpoint res;
|
||||||
ld d = hypot_d(2, h);
|
ld d = hypot_d(2, h);
|
||||||
ld cd = d == 0 ? 0 : sinh(d) / d;
|
ld cd = d == 0 ? 0 : sin_auto(d) / d;
|
||||||
res[0] = h[0] * cd;
|
res[0] = h[0] * cd;
|
||||||
res[1] = h[1] * cd;
|
res[1] = h[1] * cd;
|
||||||
res[2] = cos_auto(d);
|
res[2] = cos_auto(d);
|
||||||
|
Loading…
Reference in New Issue
Block a user