1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-23 09:57:41 +00:00

nilv:: works with small periods

This commit is contained in:
Zeno Rogue
2019-11-08 15:42:31 +01:00
parent f7fc9d7d5d
commit 6dd47c903d
4 changed files with 15 additions and 8 deletions

View File

@@ -783,6 +783,10 @@ EX namespace nilv {
EX array<int,3> nilperiod, nilperiod_edit;
EX transmatrix adjmatrix(int i) {
return nisot::translate(mvec_to_point(movevectors[i]));
}
struct hrmap_nil : hrmap {
unordered_map<mvec, heptagon*> at;
unordered_map<heptagon*, mvec> coords;
@@ -817,10 +821,6 @@ EX namespace nilv {
return child;
}
transmatrix adjmatrix(int i) {
return nisot::translate(mvec_to_point(movevectors[i]));
}
virtual transmatrix relative_matrix(heptagon *h2, heptagon *h1) override {
for(int a=0; a<S7; a++) if(h2 == h1->move(a)) return adjmatrix(a);
return nisot::translate(mvec_to_point(coords[h1].inverse() * coords[h2]));