sphere:: get_where did not memoize

This commit is contained in:
Zeno Rogue 2021-04-07 22:43:23 +02:00
parent 131b9f656e
commit c43df41a7d
1 changed files with 6 additions and 2 deletions

View File

@ -166,8 +166,12 @@ struct hrmap_spherical : hrmap_standard {
int d = celldist(c);
if(d == 0) return where[c] = Id;
else forCellIdCM(c1, i, c)
if(celldist(c1) < d)
return get_where(c1) * iadj(c, i);
if(celldist(c1) < d) {
transmatrix T = get_where(c1);
T = T * iadj(c, i);
where[c] = T;
return T;
}
return Id;
}