1
0
Fork 0
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:
Brian Fiete 2020-02-18 08:43:29 -08:00
parent b9debfe3bf
commit 90e4cf8825
11 changed files with 145 additions and 110 deletions

View file

@ -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);