mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-22 17:48:01 +02:00
Merge pull request #329 from MineGame159/master
Added IOpMultiplicable and IOpDividable, fixed Double not implementing IOpAddable and IOpSubtractable
This commit is contained in:
commit
bc64ac4d78
13 changed files with 151 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
namespace System
|
||||
{
|
||||
struct Int16 : int16, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable
|
||||
struct Int16 : int16, IInteger, ISigned, IHashable, IFormattable, IOpComparable, IIsNaN, IOpNegatable, IOpAddable, IOpSubtractable, IOpMultiplicable, IOpDividable
|
||||
{
|
||||
public const int32 MaxValue = 0x7FFF;
|
||||
public const int32 MinValue = -0x8000;
|
||||
|
@ -25,6 +25,16 @@ namespace System
|
|||
return (SelfBase)value;
|
||||
}
|
||||
|
||||
public static Self operator*(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs * (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public static Self operator/(Self lhs, Self rhs)
|
||||
{
|
||||
return (SelfBase)lhs / (SelfBase)rhs;
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
{
|
||||
return (int)this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue