1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-06-06 21:02:10 +00:00

refactored map functions: ddspin, iddspin, spacedist, spin_angle, virtualRebase[simple], adj

This commit is contained in:
Zeno Rogue
2019-11-14 16:51:50 +01:00
parent 4e534261f0
commit aeaaf7586a
15 changed files with 279 additions and 365 deletions
+16 -2
View File
@@ -555,7 +555,7 @@ struct hrmap_archimedean : hrmap {
dynamicval<eGeometry> g(geometry, gNormal);
dynamicval<hrmap*> cm(currentmap, current_altmap);
U = T;
virtualRebaseSimple(alt, T);
current_altmap->virtualRebase(alt, T);
U = U * inverse(T);
}
@@ -655,7 +655,21 @@ struct hrmap_archimedean : hrmap {
}
return gm * where;
}
ld spin_angle(cell *c, int d) {
if(PURE) {
auto& t1 = arcm::current.get_triangle(c->master, d-1);
return -(t1.first + M_PI / c->type);
}
else if(DUAL) {
auto& t1 = arcm::current.get_triangle(c->master, 2*d);
return -t1.first;
}
else { /* BITRUNCATED */
auto& t1 = arcm::current.get_triangle(c->master, d);
return -t1.first;
}
}
};
EX hrmap *new_map() { return new hrmap_archimedean; }