thesadrogue / TheSadRogue.Primitives

A collection of primitive data structures for working with a 2-dimensional grid.
MIT License
21 stars 6 forks source link

Obsolete Matches extension methods in TheSadRogue.Primitives Package #114

Open Chris3606 opened 1 year ago

Chris3606 commented 1 year ago

The function is uncallable by typical means since it operates on a self type of Rectangle and also a second type of Rectangle. This means that the typical call syntax of r1.Matches(r2) actually calls Rectangle's IMatchable implementation, and therefore unless you are calling extension methods via static method syntax, there is no way to call this extension method.

There is also no difference in functionality between this and the IMatchable implementation. Ideally we would remove it, but to preserve backwards compatibility we can just deprecate it.

Chris3606 commented 1 year ago

The same goes for ColorExtensions.Matches as well, it appears.