mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-24 07:56:59 +00:00
added epsilon to virtualRebase to prevent infinite loops caused by precision errors
This commit is contained in:
parent
168b3fb11d
commit
2b307f5e4a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user