mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
ScriptCore: Use engine implementation of half to no longer rely on Half-Package
This commit is contained in:
@@ -24,7 +24,7 @@ struct half : IFloating, ISigned, IFormattable, IHashable, IEquatable<half>, ICa
|
||||
|
||||
public bool IsNegative => (_data & Half_Sign_Mask) > 0;
|
||||
|
||||
public bool IsFinity => (_data & ~Half_Sign_Mask) < Half_Exponent_Mask;
|
||||
public bool IsFinite => (_data & ~Half_Sign_Mask) < Half_Exponent_Mask;
|
||||
public bool IsInfinity => (_data & ~Half_Sign_Mask) == Half_Exponent_Mask;
|
||||
|
||||
public bool IsPositiveInfinity => _data == PositiveInfinity._data;
|
||||
@@ -299,6 +299,16 @@ struct half : IFloating, ISigned, IFormattable, IHashable, IEquatable<half>, ICa
|
||||
return (half)((float)lhs % (float)rhs);
|
||||
}
|
||||
|
||||
public static half operator ++(half value)
|
||||
{
|
||||
return (half)((float)value + 1.0f);
|
||||
}
|
||||
|
||||
public static half operator --(half value)
|
||||
{
|
||||
return (half)((float)value - 1.0f);
|
||||
}
|
||||
|
||||
public static bool operator==(half value1, half value2) => value1._data == value2._data;
|
||||
|
||||
public static bool operator!=(half value1, half value2) => value1._data != value2._data;
|
||||
|
||||
Reference in New Issue
Block a user