mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-25 15:30:13 +00:00
fixed a bug in rel_log
This commit is contained in:
parent
0c473559f3
commit
f57157435e
@ -3316,8 +3316,8 @@ EX hyperpoint rel_log(shiftpoint h, bool relativistic_length) {
|
|||||||
ld choice = h1[2] * h1[2] - h1[0] * h1[0] - h1[1] * h1[1];
|
ld choice = h1[2] * h1[2] - h1[0] * h1[0] - h1[1] * h1[1];
|
||||||
ld r, z;
|
ld r, z;
|
||||||
if(choice > 0) {
|
if(choice > 0) {
|
||||||
ld r = sqrt(choice);
|
r = sqrt(choice);
|
||||||
ld z = asin_clamp(r);
|
z = asin_clamp(r);
|
||||||
if(h1[3] < 0) z = M_PI - z;
|
if(h1[3] < 0) z = M_PI - z;
|
||||||
z += cycles * TAU;
|
z += cycles * TAU;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user