JasonBock / SpackleNet

Spackle is a project that contains a number of helper methods I've used to supplement the core classes in .NET.
MIT License
14 stars 1 forks source link

Add an overload for Intersect #2

Closed JasonBock closed 8 years ago

JasonBock commented 10 years ago

Instead of this:

var newRange = range.Intersect(new Range<int>(5, 12));

Add this:

var newRange = range.Intersect(5, 12);

Since we know what the type is for the range, we can do this.

Also, I can't remember if I added Union to Range, but if I haven't, I should (and then provide this kind of overload)