Skip to content

Simplify interfaces#1662

Open
Muximize wants to merge 3 commits intoangularsen:masterfrom
Muximize:simplify-interfaces
Open

Simplify interfaces#1662
Muximize wants to merge 3 commits intoangularsen:masterfrom
Muximize:simplify-interfaces

Conversation

@Muximize
Copy link
Copy Markdown
Contributor

@Muximize Muximize commented May 4, 2026

In my use of UnitsNet, I find the recently added IQuantityOfType<TQuantity> very useful. I wanted to do a comparison between some, but could not without adding IComparisonOperators<TQuantity, TQuantity, bool> to the constraints of my method. I then realized this can be added to the base interface instead of the quantity itself.

While doing this I found a way to simplify some other interfaces in the inheritance chain, like reusing IArithmeticQuantity for both ILinearQuantity and ILogarithmicQuantity and removing one level of inheritance.

@lipchev Are these improvements in your opinion?

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.

1 participant