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:
parent
a0fa8c85c4
commit
ba94bc94b6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user