From c032db20191456fd867c889c04a698aaad5b24cd Mon Sep 17 00:00:00 2001 From: ? Date: Wed, 27 Feb 2019 18:36:02 +0100 Subject: [PATCH] 3d:: virtualRebase works correctly in non-hyperbolic tilings --- geometry2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geometry2.cpp b/geometry2.cpp index 52bfeadb..ca33c7bb 100644 --- a/geometry2.cpp +++ b/geometry2.cpp @@ -299,7 +299,7 @@ void virtualRebase(cell*& base, T& at, bool tohex, const U& check) { while(true) { - double currz = check(at)[DIM]; + double currz = hdist0(check(at)); heptagon *h = base->master; @@ -344,7 +344,7 @@ void virtualRebase(cell*& base, T& at, bool tohex, const U& check) { newbase = NULL; forCellCM(c2, base) { transmatrix V2 = calc_relative_matrix(base, c2, C0); - double newz = check(V2 * at) [DIM]; + double newz = hdist0(check(V2 * at)); if(newz < currz - 1e-4) { currz = newz; bestV = V2;