mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
fixed distance calculation in bitruncated {4,4}
This commit is contained in:
parent
432583d6ce
commit
e319d953ea
@ -1138,7 +1138,7 @@ EX int dist(int sx, int sy, bool reduce IS(true)) {
|
||||
int z0 = abs(sx);
|
||||
int z1 = abs(sy);
|
||||
if(a4 && BITRUNCATED)
|
||||
return (z0 == z1 && z0 > 0 && reduce) ? z0+1: max(z0, z1);
|
||||
return (z0 == z1 && z0 > 0 && !reduce) ? z0+1: max(z0, z1);
|
||||
if(a4) return z0 + z1;
|
||||
int z2 = abs(sx+sy);
|
||||
return max(max(z0,z1), z2);
|
||||
|
Loading…
Reference in New Issue
Block a user