diff --git a/control.cpp b/control.cpp index e92be312..e3621f7c 100644 --- a/control.cpp +++ b/control.cpp @@ -85,7 +85,6 @@ EX movedir vectodir(hyperpoint P) { transmatrix U = unshift(ggmatrix(cwt.at)); if(embedded_plane && geom3::same_in_same()) U = current_display->radar_transform * U; - if(geom3::euc_in_nil()) P[2] = -P[2]; /* no idea why */ P = direct_exp(lp_iapply(P)); hyperpoint H = sphereflip * tC0(U); @@ -100,7 +99,7 @@ EX movedir vectodir(hyperpoint P) { for(int i=0; itype; i++) { transmatrix T = currentmap->adj(cwt.at, (cwt + i).spin); ld d1 = geo_dist(U * T * TC0, Centered * P); - ld d2 = geo_dist(U * T * TC0, Centered * TC0); + ld d2 = geo_dist(U * T * TC0, Centered * C0); dirdist[i] = d1 - d2; } @@ -124,7 +123,7 @@ EX void remission() { } EX hyperpoint move_destination_vec(int d) { - if(WDIM == 2) return spin(-d * 45._deg) * smalltangent(); + if(WDIM == 2 && (!embedded_plane || geom3::same_in_same())) return spin(-d * 45._deg) * smalltangent(); else if(d&1) return cspin(0, 1, d > 4 ? 45._deg : -45._deg) * smalltangent(); else return cspin(0, 2, d * 45._deg) * smalltangent(); } diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 57d6ba77..823c0ee5 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -1797,7 +1797,7 @@ EX hyperpoint lp_apply(const hyperpoint h) { return nisot::local_perspective_used() ? NLP * h : h; } -EX hyperpoint smalltangent() { if(embedded_plane && msphere) return lxpush0(0.1); else return xtangent(.1); } +EX hyperpoint smalltangent() { return xtangent(.1); } EX void cyclefix(ld& a, ld b) { while(a > b + M_PI) a -= TAU;