Closed JasonBock closed 1 year ago
Or, create a IRange<T> where T : INumber<T>
interface with members that have default implementations. That way I can keep derivations as struct
types.
OK, I've tried a bunch of things, and this just isn't going to work very well. So I'm closing the issue.
I feel weird with the current implementation of
Partition()
. What I think I should be doing is having an abstractRange<T>
where all of the current work is in the base type, and then I havePartition()
asabstract
. That would be implemented inIntegralRange<T>
andFloatingRange<T>
. I could have twostatic
Create()
methods whereT
is further constrained by the two number interfaces, though I'm not sure I can do that.