fixed distance calculation in bitruncated {4,4}

This commit is contained in:
Zeno Rogue 2019-12-27 11:30:42 +01:00
parent 432583d6ce
commit e319d953ea
1 changed files with 1 additions and 1 deletions

View File

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