Skip to content

const Rational #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
modulovalue opened this issue Jul 29, 2019 · 1 comment
Closed

const Rational #22

modulovalue opened this issue Jul 29, 2019 · 1 comment

Comments

@modulovalue
Copy link

Rationals should have a const constructor and dart-lang/sdk#33893 is preventing that from happening. Is that observation correct?

@a14n
Copy link
Owner

a14n commented Jul 29, 2019

That's not the only issue. In Rational._normalized there's a check to ensure GCD of numerator and denominator is 1. This will prevent Rational to be const.

@a14n a14n closed this as completed Jul 29, 2019
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

No branches or pull requests

2 participants