mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-26 00:47:00 +00:00
fixed twisted product on tori
This commit is contained in:
parent
4e8caa2910
commit
06ca86cbc5
@ -1273,7 +1273,7 @@ EX namespace hybrid {
|
|||||||
hybrid::csteps = cgi.psl_steps;
|
hybrid::csteps = cgi.psl_steps;
|
||||||
if(nil) {
|
if(nil) {
|
||||||
auto& T = euc::eu_input.user_axes;
|
auto& T = euc::eu_input.user_axes;
|
||||||
hybrid::csteps = gcd(gcd(T[0][0], T[1][1]), gcd(T[0][1], T[1][0]));
|
hybrid::csteps = abs(T[0][0] * T[1][1] - T[0][1] * T[1][0]);
|
||||||
if(S3 == 3) hybrid::csteps *= 2;
|
if(S3 == 3) hybrid::csteps *= 2;
|
||||||
if(BITRUNCATED) hybrid::csteps *= S3;
|
if(BITRUNCATED) hybrid::csteps *= S3;
|
||||||
if(INVERSE) hybrid::csteps *= 2;
|
if(INVERSE) hybrid::csteps *= 2;
|
||||||
@ -1342,7 +1342,8 @@ EX namespace hybrid {
|
|||||||
auto& v = get_shift_current(cw0);
|
auto& v = get_shift_current(cw0);
|
||||||
if(v != SHIFT_UNKNOWN) return v;
|
if(v != SHIFT_UNKNOWN) return v;
|
||||||
|
|
||||||
if(nil) {
|
if(nil) return in_underlying([&] { return get_shift(cw0); });
|
||||||
|
if(euclid && !quotient) {
|
||||||
/** we prevent possible 'two candidate' errors by computing the correct value, we know all the positions in the underlying map, so we can do that */
|
/** we prevent possible 'two candidate' errors by computing the correct value, we know all the positions in the underlying map, so we can do that */
|
||||||
transmatrix uT, uU, uT1;
|
transmatrix uT, uU, uT1;
|
||||||
in_underlying([&] {
|
in_underlying([&] {
|
||||||
@ -1430,7 +1431,7 @@ EX namespace hybrid {
|
|||||||
cw++;
|
cw++;
|
||||||
}
|
}
|
||||||
while(cw != cw0);
|
while(cw != cw0);
|
||||||
return total + cgi.single_step * (sphere ? -1 : 1);
|
return total + cgi.single_step * ((sphere || euclid) ? -1 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void fix_bounded_cycles() {
|
EX void fix_bounded_cycles() {
|
||||||
|
Loading…
Reference in New Issue
Block a user