Skip to content
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

Allow multiplying by a unit #510

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

portyanikhin
Copy link
Contributor

@portyanikhin portyanikhin commented Mar 16, 2025

Partially closes #366 and #367. I think it will greatly improve the usability, e.g.:

let p: Pressure = 2.0 * atmosphere;

I've tried many solutions to this issue. In my opinion, this is the only option that doesn't require breaking changes (and the only option that worked). On the downside, I noticed that the compilation time has increased.

Anyway, a review is needed here.
It's possible that there will be a better solution.

@portyanikhin portyanikhin force-pushed the add-mul-impls-for-units branch from 5376f0f to 74d4143 Compare March 16, 2025 20:55
@portyanikhin portyanikhin force-pushed the add-mul-impls-for-units branch from 74d4143 to 12069e8 Compare March 24, 2025 15:08
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.

Suggestion: allow multiplying by a unit
1 participant