-
Notifications
You must be signed in to change notification settings - Fork 393
Having a Unit.SI #519
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
Comments
We were discussing having a UnitSystem class where you would define the 7 base units (as well as have a predefined SI system), and allow From and As to take a UnitSystem. This would allow you to convert or define everything in a consistent system of your choosing. However it is not possible at this time. The auto generated operator overloads will need to be worked on first to get it to work generically. |
What @tmilnthorp said. When we (read @tmilnthorp ) extends with a new
|
#524 on the way already, wow. |
Only works for base (single dimension of 1) units right now of course. Need to add all the operator overloads to allow derived unit conversion |
You guys are awesome!
|
I will look at that next. Right now it's just a system definition. I'd like to add a UnitSystem overload to the From/As methods. |
Closing this issue in favor of #547 on v4 branch. |
I find myself having a lot of:
And a lot of:
in my code.
I would love at have a option to not have to write the long SI-units (fx. KilogramsPerSecond).
If I could write instead:
Then my code would look much more clean and there would be less errors.
What do you think of this idea? And how difficult would it be to implement?
The text was updated successfully, but these errors were encountered: