mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +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) {
|
for(int f: arcm::current.faces) {
|
||||||
if(int(denom*f)/f != denom) { steps = 0; single_step = 0; return false; }
|
if(int(denom*f)/f != denom) { steps = 0; single_step = 0; return false; }
|
||||||
nom = nom * f + (f-2) * denom;
|
int g = gcd(denom, f);
|
||||||
denom = denom * f;
|
nom = nom * (f/g) + (f-2) * (denom/g);
|
||||||
int g = gcd(nom, denom);
|
denom = denom/g * f;
|
||||||
nom /= g;
|
|
||||||
denom /= g;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
steps = 2 * abs(denom);
|
steps = 2 * abs(denom);
|
||||||
|
Loading…
Reference in New Issue
Block a user