mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 23:47:00 +00:00
fixed non-shader-based slr::get_inverse_exp
This commit is contained in:
parent
26a98237e0
commit
42446f1925
@ -1744,13 +1744,15 @@ EX namespace slr {
|
||||
ld xy = hypot_d(2, h.h);
|
||||
ld phi = atan2(h[2], h[3]) + h.shift;
|
||||
|
||||
if(xy < 1e-6) return point31(0.,0.,phi);
|
||||
|
||||
bool flipped = phi > 0;
|
||||
if(flipped) phi = -phi, h[2] *= -1, h[0] *= -1;
|
||||
if(flipped) phi = -phi;
|
||||
|
||||
ld SV = stretch::not_squared();
|
||||
ld K = -1;
|
||||
|
||||
ld alpha = atan2(h[1], -h[0]); /* todo shift */
|
||||
ld alpha = flipped ? atan2(h[1], h[0]) - h.shift : atan2(h[1], -h[0]) + h.shift;
|
||||
|
||||
hyperpoint res;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user