-
Notifications
You must be signed in to change notification settings - Fork 137
#1575: Fixed the implementation of equivalent for ratios
#1576
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
Conversation
|
Formatting check succeeded! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1576 +/- ##
=========================================
Coverage 64.92% 64.92%
+ Complexity 1981 1976 -5
=========================================
Files 499 499
Lines 28814 28820 +6
Branches 5667 5667
=========================================
+ Hits 18707 18711 +4
- Misses 7795 7797 +2
Partials 2312 2312 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
equivalent for ratios~ for ratios
~ for ratiosequivalent for ratios
|
Sorry I didn't communicate this in the bug report (only here) but I have a branch that fixes |
|
I submitted my branch as a pull request for reference. |
…`equivalent` for ratio
|
Hi @scymtym I'd tackle this separately from the broader "unit-aware quantity operations" feature, so this PR is good to go first while yours is in review. I can jump on to reviewing your PR next (which is very impressive!). I did like your |
|


Closes #1575:
equivalentlogic for ratios to make e.g.1'cm':2'cm' ~ 2'cm':4'cm'evaluate totrue. The result is calculated asequivalent(a.numerator * b.denominator, b.numerator * a.denominator).divideevaluator to make dividing by a 0-valued quantity returnnull. Previously it threw a NullPointerException.