1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-12 15:26:00 +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

@@ -61,12 +61,12 @@ struct iring {
ld delta = 0.004;
transmatrix T = cspin(1, 2, 45*degree);
transmatrix T = cspin(1, 2, 45._deg);
int switchat = nil ? 1024 : 2048;
auto step = [&] (int id) {
ld alpha = id * 1. / steps * 2 * M_PI;
ld alpha = id * 1. / steps * TAU;
if(id < switchat)
return T * point3(cos(alpha) * delta, sin(alpha) * delta, 0);
else
@@ -113,7 +113,7 @@ struct iring {
hyperpoint uds[3];
ld alpha = a * 1. / steps * 2 * M_PI;
ld alpha = a * 1. / steps * TAU;
if(a < switchat) {
uds[0] = T * point31(sin(alpha) * cscale, -cos(alpha) * cscale, 0) - C0;
uds[1] = T * point31(0, 0, cscale) - C0;