mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 00:50:25 +02:00
IOpSubtractable
The opposite of IOpAddable, useful for generic code.
This commit is contained in:
parent
96c53d4a9e
commit
9a8beec7d9
11 changed files with 63 additions and 8 deletions
|
@ -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