You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the Scalar type introduced in #889 but it doesn't currently play nicely with the existing quantities. All quantities with arithmetic operations should support Scalar in place of double e.g. Scalar * Acceleration or Angle / Scalar.
It makes sense I suppose.
I just checked, operator overloads supports implicit cast, so if Scalar implements implicit cast to double then I believe we should be able to reuse all existing operator overloads accepting a double.
Would you be interested in attempting a pull request? I'm happy to assist.
A good place to start is adding Scalar.extra.cs in UnitsNet/CustomCode/Quantities/.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
angularsen commentedon Mar 13, 2021
It makes sense I suppose.
I just checked, operator overloads supports implicit cast, so if
Scalarimplements implicit cast todoublethen I believe we should be able to reuse all existing operator overloads accepting adouble.Would you be interested in attempting a pull request? I'm happy to assist.
A good place to start is adding
Scalar.extra.csin UnitsNet/CustomCode/Quantities/.CallumECameron commentedon Mar 19, 2021
Sounds good, that would work. I have raised a PR, there are a couple of issues but can continue discussion there.
stale commentedon Jun 2, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.