1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-10 14:26:01 +00:00

used cyclefix and raddif in more places; (c)spin90, (c)spin180 and spin180 functions; rephrased M_PI in terms of TAU and x._deg when applicable

This commit is contained in:
Zeno Rogue
2022-11-12 22:38:45 +01:00
parent 563b9c1f74
commit 06523e063e
100 changed files with 750 additions and 757 deletions

View File

@@ -646,12 +646,12 @@ EX namespace gp {
}
if(sp>SG3) sp -= SG6;
return normalize(spin(2*M_PI*sp/S7) * cornmul(T, corner));
return normalize(spin(TAU*sp/S7) * cornmul(T, corner));
}
transmatrix dir_matrix(int i) {
auto ddspin = [] (int d) -> transmatrix {
return spin(M_PI - d * 2 * M_PI / S7 - cgi.hexshift);
return spin(M_PI - d * TAU / S7 - cgi.hexshift);
};
return spin(-cgi.gpdata->alpha) * build_matrix(
C0,
@@ -678,7 +678,7 @@ EX namespace gp {
hyperpoint h = atz(T, cgi.gpdata->corners, at, 6);
hyperpoint hl = atz(T, cgi.gpdata->corners, at + eudir(d), 6);
cgi.gpdata->Tf[i][x&GOLDBERG_MASK][y&GOLDBERG_MASK][d] = rgpushxto0(h) * rspintox(gpushxto0(h) * hl) * spin(M_PI);
cgi.gpdata->Tf[i][x&GOLDBERG_MASK][y&GOLDBERG_MASK][d] = rgpushxto0(h) * rspintox(gpushxto0(h) * hl) * spin180();
}
}
}