Skip to content

Conversation

krakow10
Copy link
Contributor

@krakow10 krakow10 commented Feb 1, 2025

Hi, I saw this comment and wrote this code on a whim. If it's completely unnecessary that's fine.

@fintelia
Copy link
Contributor

fintelia commented Feb 3, 2025

The code itself looks good to me, but TBH I'm not really sure what the implications of this change are

@RunDevelopment
Copy link
Contributor

I think you can derive (Partial)Eq now, since equivalent ratios are mapped to the same representation.

Copy link
Member

@197g 197g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm on board with the advantage of being able to rely on comparison, no matter the underlying granularity. The loop has at most 32 iterations as well so the effects on any existing code using that constructor should not be drastic. And in any case, I do not expect this to be used as part of a really tight loop anywhere. (We're already deriving Eq though which is .. odd).

@197g 197g merged commit db6cdfe into image-rs:main Aug 14, 2025
32 checks passed
@krakow10 krakow10 deleted the gcd branch August 15, 2025 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants