added epsilon to virtualRebase to prevent infinite loops caused by precision errors

This commit is contained in:
?
2019-09-12 22:38:42 +02:00
committed by Zeno Rogue
parent 168b3fb11d
commit 2b307f5e4a
+1 -1
View File
@@ -343,7 +343,7 @@ void virtualRebase(cell*& base, T& at, bool tohex, const U& check) {
forCellCM(c2, base) {
transmatrix V2 = calc_relative_matrix(base, c2, C0);
double newz = check(V2 * at) [DIM];
if(newz < currz) {
if(newz < currz - 1e-4) {
currz = newz;
bestV = V2;
newbase = c2;