mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-01 03:39:16 +00:00
3d:: virtualRebase works correctly in non-hyperbolic tilings
This commit is contained in:
parent
c14515c5ac
commit
c032db2019
@ -299,7 +299,7 @@ void virtualRebase(cell*& base, T& at, bool tohex, const U& check) {
|
|||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
|
|
||||||
double currz = check(at)[DIM];
|
double currz = hdist0(check(at));
|
||||||
|
|
||||||
heptagon *h = base->master;
|
heptagon *h = base->master;
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ void virtualRebase(cell*& base, T& at, bool tohex, const U& check) {
|
|||||||
newbase = NULL;
|
newbase = NULL;
|
||||||
forCellCM(c2, base) {
|
forCellCM(c2, base) {
|
||||||
transmatrix V2 = calc_relative_matrix(base, c2, C0);
|
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) {
|
if(newz < currz - 1e-4) {
|
||||||
currz = newz;
|
currz = newz;
|
||||||
bestV = V2;
|
bestV = V2;
|
||||||
|
Loading…
Reference in New Issue
Block a user