From 6b90261f2f4e55dfc91f37257402c0fd605d54a9 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 6 Dec 2019 12:14:03 +0100 Subject: [PATCH] fixed celldistance in sl2 --- nonisotropic.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nonisotropic.cpp b/nonisotropic.cpp index ab8e1a8a..c9c9fde3 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -1262,7 +1262,11 @@ EX namespace hybrid { } EX int celldistance(cell *c1, cell *c2) { - if(cgi.steps == 0) { + if(sl2) { + auto w1 = hybrid::get_where(c1), w2 = hybrid::get_where(c2); + return PIU (hr::celldistance(w1.first, w2.first)); + } + else if(cgi.steps == 0) { auto w1 = hybrid::get_where(c1), w2 = hybrid::get_where(c2); return PIU (hr::celldistance(w1.first, w2.first)) + abs(w1.second - w2.second); }