mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-21 01:18:02 +02:00
Expanded BinarySearch api, got rid of IComparable due to iOpComparable
This commit is contained in:
parent
b9debfe3bf
commit
90e4cf8825
11 changed files with 145 additions and 110 deletions
|
@ -1,23 +1,5 @@
|
|||
namespace System
|
||||
{
|
||||
interface IComparable<T>
|
||||
{
|
||||
int32 CompareTo(T other);
|
||||
}
|
||||
|
||||
public interface IComparer<T>
|
||||
{
|
||||
int Compare(T x, T y);
|
||||
}
|
||||
|
||||
public class CompareWrapper<T> : IComparer<T> where T : IOpComparable
|
||||
{
|
||||
public int Compare(T x, T y)
|
||||
{
|
||||
return x <=> y;
|
||||
}
|
||||
}
|
||||
|
||||
interface INumeric
|
||||
{
|
||||
static Self operator+(Self lhs, Self rhs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue