You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (let n = o[i], r; r = n % (n = max); max = r);
return max;
};
// Here I even didn't try to go with my naive solution as it was clear it would fail haha
// After some observations (measuring how the integer intersections progresses), I perceived there was a common factor (if this should be clear on first sight, it means that my Math skills are still in baby level ;_;)
const x = Math.abs(x1 - x2);
const y = Math.abs(y1 - y2);
const factor = gcd(x, y);
// In case the height (or width) is 0, but not both...