2019-08-23 11:56:54 -07:00
|
|
|
namespace System
|
|
|
|
{
|
2020-01-28 10:58:52 -08:00
|
|
|
interface INumeric
|
|
|
|
{
|
|
|
|
static Self operator+(Self lhs, Self rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IInteger : INumeric
|
2019-08-23 11:56:54 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-01-28 10:58:52 -08:00
|
|
|
interface IUnsigned : INumeric
|
2019-08-23 11:56:54 -07:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ISigned
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IFloating
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where bool : operator T == T`", false)]
|
2019-08-23 11:56:54 -07:00
|
|
|
interface IOpEquals
|
|
|
|
{
|
|
|
|
public static bool operator==(Self val1, Self val2);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where bool : operator T == T2`", false)]
|
2019-08-23 11:56:54 -07:00
|
|
|
interface IOpEquals<T>
|
|
|
|
{
|
|
|
|
public static bool operator==(Self val1, T val2);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where int : operator T <=> T`", false)]
|
2019-08-23 11:56:54 -07:00
|
|
|
interface IOpComparable
|
|
|
|
{
|
|
|
|
static int operator<=>(Self lhs, Self rhs);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where T : operator T + T`", false)]
|
2019-08-23 11:56:54 -07:00
|
|
|
interface IOpAddable
|
|
|
|
{
|
|
|
|
static Self operator+(Self lhs, Self rhs);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where T : operator T - T`", false)]
|
2020-03-20 22:01:18 +00:00
|
|
|
interface IOpSubtractable
|
|
|
|
{
|
|
|
|
static Self operator-(Self lhs, Self rhs);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where T : operator T * T`", false)]
|
2020-06-05 15:46:31 +02:00
|
|
|
interface IOpMultiplicable
|
|
|
|
{
|
|
|
|
static Self operator*(Self lhs, Self rhs);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where T : operator T / T`", false)]
|
2020-06-05 15:46:31 +02:00
|
|
|
interface IOpDividable
|
|
|
|
{
|
|
|
|
static Self operator/(Self lhs, Self rhs);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where T : operator -T`", false)]
|
2019-08-23 11:56:54 -07:00
|
|
|
interface IOpNegatable
|
|
|
|
{
|
|
|
|
static Self operator-(Self value);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where T : operator implicit T2`", false)]
|
2019-08-23 11:56:54 -07:00
|
|
|
interface IOpConvertibleTo<T>
|
|
|
|
{
|
|
|
|
static operator T(Self value);
|
|
|
|
}
|
|
|
|
|
2020-08-10 13:27:48 -07:00
|
|
|
[Obsolete("Consider operator constraint such as `where T : operator implicit T2`", false)]
|
2019-08-23 11:56:54 -07:00
|
|
|
interface IOpConvertibleFrom<T>
|
|
|
|
{
|
|
|
|
static operator Self(T value);
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IIsNaN
|
|
|
|
{
|
|
|
|
bool IsNaN { get; }
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ICanBeNaN : IIsNaN
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2020-05-08 07:10:35 -07:00
|
|
|
|
|
|
|
public delegate int Comparison<T>(T lhs, T rhs);
|
2019-08-23 11:56:54 -07:00
|
|
|
}
|