mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 18:18:00 +02:00
Merge branch 'IOpSubtractable'
This commit is contained in:
commit
bc264c9447
11 changed files with 65 additions and 10 deletions
|
@ -43,6 +43,11 @@ namespace System
|
|||
static Self operator+(Self lhs, Self rhs);
|
||||
}
|
||||
|
||||
interface IOpSubtractable
|
||||
{
|
||||
static Self operator-(Self lhs, Self rhs);
|
||||
}
|
||||
|
||||
interface IOpNegatable
|
||||
{
|
||||
static Self operator-(Self value);
|
||||
|
|
|
@ -2,7 +2,7 @@ using System;
|
|||
|
||||
namespace System
|
||||
{
|
||||
struct Int : int, IInteger, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable
|
||||
struct Int : int, IInteger, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public enum ParseError
|
||||
{
|
||||
|
@ -21,6 +21,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self value)
|
||||
{
|
||||
return (SelfBase)value;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace System
|
||||
{
|
||||
struct Int16 : int16, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable
|
||||
struct Int16 : int16, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public const int32 MaxValue = 0x7FFF;
|
||||
public const int32 MinValue = -0x8000;
|
||||
|
@ -15,6 +15,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self value)
|
||||
{
|
||||
return (SelfBase)value;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Globalization;
|
|||
|
||||
namespace System
|
||||
{
|
||||
struct Int32 : int32, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable
|
||||
struct Int32 : int32, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public enum ParseError
|
||||
{
|
||||
|
@ -24,6 +24,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self value)
|
||||
{
|
||||
return (SelfBase)value;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Globalization;
|
|||
|
||||
namespace System
|
||||
{
|
||||
struct Int64 : int64, IInteger, ISigned, IFormattable, IHashable, IOpComparable, IIsNaN, IOpNegatable
|
||||
struct Int64 : int64, IInteger, ISigned, IFormattable, IHashable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public enum ParseError
|
||||
{
|
||||
|
@ -25,6 +25,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Int64 operator-(Int64 value)
|
||||
{
|
||||
return -(SelfBase)value;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace System
|
||||
{
|
||||
struct Int8 : int8, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable
|
||||
struct Int8 : int8, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public const int32 MaxValue = 0x7F;
|
||||
public const int32 MinValue = -0x80;
|
||||
|
@ -15,6 +15,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self value)
|
||||
{
|
||||
return (SelfBase)value;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace System
|
||||
{
|
||||
struct UInt : uint, IInteger, IUnsigned, IHashable, IOpComparable, IFormattable, IIsNaN, IOpAddable
|
||||
struct UInt : uint, IInteger, IUnsigned, IHashable, IOpComparable, IFormattable, IIsNaN, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public enum ParseError
|
||||
{
|
||||
|
@ -27,6 +27,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
{
|
||||
return (int)this;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace System
|
||||
{
|
||||
struct UInt16 : uint16, IInteger, IUnsigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable
|
||||
struct UInt16 : uint16, IInteger, IUnsigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public const uint16 MaxValue = (uint16)0xFFFF;
|
||||
public const uint16 MinValue = 0;
|
||||
|
@ -15,6 +15,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self value)
|
||||
{
|
||||
return (SelfBase)value;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace System
|
||||
{
|
||||
struct UInt32 : uint32, IInteger, IUnsigned, IHashable, IOpComparable, IFormattable, IIsNaN, IOpAddable
|
||||
struct UInt32 : uint32, IInteger, IUnsigned, IHashable, IOpComparable, IFormattable, IIsNaN, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public enum ParseError
|
||||
{
|
||||
|
@ -22,6 +22,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
{
|
||||
return (int)this;
|
||||
|
|
|
@ -2,7 +2,7 @@ using System.Globalization;
|
|||
|
||||
namespace System
|
||||
{
|
||||
struct UInt64 : uint64, IInteger, IUnsigned, IHashable, IOpComparable, IIsNaN, IFormattable
|
||||
struct UInt64 : uint64, IInteger, IUnsigned, IHashable, IOpComparable, IIsNaN, IFormattable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public const uint64 MaxValue = 0xFFFFFFFFFFFFFFFFUL;
|
||||
public const uint64 MinValue = 0;
|
||||
|
@ -24,6 +24,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
{
|
||||
return (int)this;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
namespace System
|
||||
{
|
||||
struct UInt8 : uint8, IInteger, IUnsigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable
|
||||
struct UInt8 : uint8, IInteger, IUnsigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
{
|
||||
public const uint8 MaxValue = (uint8)0xFF;
|
||||
public const uint8 MinValue = 0;
|
||||
|
@ -15,6 +15,11 @@ namespace System
|
|||
return (SelfBase)lhs + (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs - (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator-(Self value)
|
||||
{
|
||||
return (SelfBase)value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue