mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
fixed RogueViz still using old functions
This commit is contained in:
parent
1a770aaf37
commit
168a9bc304
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -23,7 +23,7 @@ hyperpoint spcoord(hyperpoint h) {
|
||||
ld phi = h[0], y = h[1], z = h[2], r = global_r;
|
||||
dynamicval<eGeometry> 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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user