1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 18:48:01 +02:00

Added IOpMultiplicable and IOpDividable, fixed Double not implementing IOpAddable and IOpSubtractable

This commit is contained in:
MineGame159 2020-06-05 15:46:31 +02:00
parent 5d9a5f183d
commit 862c15241a
13 changed files with 151 additions and 11 deletions

View file

@ -2,7 +2,7 @@ using System.Globalization;
namespace System
{
struct Float : float, IFloating, ISigned, IFormattable, IHashable, IEquatable<float>, IOpComparable, IOpNegatable, IOpAddable, IOpSubtractable, ICanBeNaN
struct Float : float, IFloating, ISigned, IFormattable, IHashable, IEquatable<float>, IOpComparable, IOpNegatable, IOpAddable, IOpSubtractable, IOpMultiplicable, IOpDividable, ICanBeNaN
{
public const float MinValue = (float)-3.40282346638528859e+38;
public const float Epsilon = (float)1.4e-45;
@ -34,6 +34,16 @@ 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 lhs, Self rhs)
{
return (SelfBase)lhs / (SelfBase)rhs;
}
/*public bool IsNegative
{
get