3d:: fixed Euclidean celldistance (abs was missing)

This commit is contained in:
?
2019-09-12 22:38:42 +02:00
committed by Zeno Rogue
parent be56844dcc
commit 38ded28511
+1 -1
View File
@@ -569,7 +569,7 @@ namespace euclid3 {
int celldistance(cell *c1, cell *c2) {
auto cm = cubemap();
coord a = cm->ispacemap[c1->master] - cm->ispacemap[c2->master];
return getcoord(a, 0) + getcoord(a, 1) + getcoord(a, 2);
return abs(getcoord(a, 0)) + abs(getcoord(a, 1)) + abs(getcoord(a, 2));
}
}