1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

fixed direct_exp in S2xE

This commit is contained in:
Zeno Rogue 2020-09-21 12:03:32 +02:00
parent 4ce821bf7a
commit fdcba734c9

View File

@ -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);