diff --git a/rogueviz-banachtarski.cpp b/rogueviz-banachtarski.cpp index bcb1fefd..328be2ec 100644 --- a/rogueviz-banachtarski.cpp +++ b/rogueviz-banachtarski.cpp @@ -388,7 +388,7 @@ void bantar_frame() { gmatrix.clear(); - drawStandard(); + currentmap->draw(); if(0) for(auto p: parent) if(gmatrix.count(p.first) && gmatrix.count(p.second) && infos[p.first].gid == i && infos[p.second].gid == i) queueline(tC0(gmatrix[p.first]), tC0(gmatrix[p.second]), 0xFFFFFFFF, 2); subscr[i] = move(ptds); diff --git a/rogueviz-flocking.cpp b/rogueviz-flocking.cpp index 8924e920..86dd1ebc 100644 --- a/rogueviz-flocking.cpp +++ b/rogueviz-flocking.cpp @@ -195,7 +195,7 @@ namespace flocking { if(coh_count) velvec += coh * (d * coh_factor / coh_count); // hypot2 is the length of a vector in R^2 - vels[i] = hypot2(velvec); + vels[i] = hypot_d(2, velvec); ld alpha = -atan2(velvec); if(vels[i] > max_speed) { diff --git a/rogueviz-graph.cpp b/rogueviz-graph.cpp index 984bd1d8..eef14391 100644 --- a/rogueviz-graph.cpp +++ b/rogueviz-graph.cpp @@ -283,7 +283,7 @@ void create_model() { hyperpoint err = hpxyz(500,0,0); -bool iserror(hyperpoint h) { return sqhypot2(h) > 10000 || std::isnan(h[0]) || std::isnan(h[1]) || std::isnan(h[2]) || std::isinf(h[0]) || std::isinf(h[1]) || std::isinf(h[2]); } +bool iserror(hyperpoint h) { return sqhypot_d(2, h) > 10000 || std::isnan(h[0]) || std::isnan(h[1]) || std::isnan(h[2]) || std::isinf(h[0]) || std::isinf(h[1]) || std::isinf(h[2]); } hyperpoint xy_to_point(ld x, ld y) { if(sphere && hypot(x, y) > 1) diff --git a/rogueviz-staircase.cpp b/rogueviz-staircase.cpp index 4482a971..d981fdde 100644 --- a/rogueviz-staircase.cpp +++ b/rogueviz-staircase.cpp @@ -23,7 +23,7 @@ hyperpoint spcoord(hyperpoint h) { ld phi = h[0], y = h[1], z = h[2], r = global_r; dynamicval gw(geometry, rug::gwhere == gElliptic ? gSphere : rug::gwhere); hyperpoint inh = xpush(-acurvature*(y + r - frac(progress))/szoom) * xspinpush0(M_PI/2, acurvature*z); - hyperpoint i = inh * (hdist0(inh) / hypot2(inh)); + hyperpoint i = inh * (hdist0(inh) / hypot_d(2, inh)); ld aphi = (r+phi + floor(progress))*M_PI/6; return hpxyz(i[1] * sin(aphi), i[1] * cos(aphi), i[0]); }