1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-22 23:17:04 +00:00

less aggressive gcd in archimedean -- steps needs to divide by all f's

This commit is contained in:
Zeno Rogue 2019-08-27 21:57:25 +02:00
parent a0fa8c85c4
commit ba94bc94b6

View File

@ -1314,11 +1314,9 @@ bool archimedean_tiling::get_step_values(int& steps, int& single_step) {
for(int f: arcm::current.faces) {
if(int(denom*f)/f != denom) { steps = 0; single_step = 0; return false; }
nom = nom * f + (f-2) * denom;
denom = denom * f;
int g = gcd(nom, denom);
nom /= g;
denom /= g;
int g = gcd(denom, f);
nom = nom * (f/g) + (f-2) * (denom/g);
denom = denom/g * f;
}
steps = 2 * abs(denom);