mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Update Float.bf
Implement IOpAddable and IOpSubtractable.
This commit is contained in:
parent
371f649fba
commit
ac65cc2dde
1 changed files with 11 additions and 1 deletions
|
@ -2,7 +2,7 @@ using System.Globalization;
|
||||||
|
|
||||||
namespace System
|
namespace System
|
||||||
{
|
{
|
||||||
struct Float : float, IFloating, ISigned, IFormattable, IHashable, IEquatable<float>, IOpComparable, IOpNegatable, ICanBeNaN
|
struct Float : float, IFloating, ISigned, IFormattable, IHashable, IEquatable<float>, IOpComparable, IOpNegatable, IOpAddable, IOpSubtractable, ICanBeNaN
|
||||||
{
|
{
|
||||||
public const float MinValue = (float)-3.40282346638528859e+38;
|
public const float MinValue = (float)-3.40282346638528859e+38;
|
||||||
public const float Epsilon = (float)1.4e-45;
|
public const float Epsilon = (float)1.4e-45;
|
||||||
|
@ -24,6 +24,16 @@ namespace System
|
||||||
return (float)value;
|
return (float)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 bool IsNegative
|
/*public bool IsNegative
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue