mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-22 08:14:07 +00:00
fixed eudist in bitruncated square grid
This commit is contained in:
parent
3bf2ed1d2d
commit
b5c0675daa
2
cell.cpp
2
cell.cpp
@ -1014,6 +1014,8 @@ void verifycells(heptagon *at) {
|
|||||||
int eudist(int sx, int sy) {
|
int eudist(int sx, int sy) {
|
||||||
int z0 = abs(sx);
|
int z0 = abs(sx);
|
||||||
int z1 = abs(sy);
|
int z1 = abs(sy);
|
||||||
|
if(a4 && BITRUNCATED)
|
||||||
|
return (z0 == z1 && z0 > 0) ? z0+1: max(z0, z1);
|
||||||
if(a4) return z0 + z1;
|
if(a4) return z0 + z1;
|
||||||
int z2 = abs(sx+sy);
|
int z2 = abs(sx+sy);
|
||||||
return max(max(z0,z1), z2);
|
return max(max(z0,z1), z2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user