mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-27 20:18:01 +02:00
Add ability to get min/max values for generic int's and uint's
This commit is contained in:
parent
6302416e40
commit
484b9716db
12 changed files with 72 additions and 10 deletions
|
@ -3,7 +3,7 @@ using System.Globalization;
|
|||
namespace System
|
||||
{
|
||||
#unwarn
|
||||
struct Int64 : int64, IInteger, ISigned, IFormattable, IHashable, IIsNaN, IParseable<int64, ParseError>, IParseable<int64>
|
||||
struct Int64 : int64, IInteger, ISigned, IFormattable, IHashable, IIsNaN, IParseable<int64, ParseError>, IParseable<int64>, IMinMaxValue<int64>
|
||||
{
|
||||
public enum ParseError
|
||||
{
|
||||
|
@ -16,6 +16,9 @@ namespace System
|
|||
public const int64 MaxValue = 0x7FFFFFFFFFFFFFFFL;
|
||||
public const int64 MinValue = -0x8000000000000000L;
|
||||
|
||||
public static int64 IMinMaxValue<int64>.MinValue => MinValue;
|
||||
public static int64 IMinMaxValue<int64>.MaxValue => MaxValue;
|
||||
|
||||
public static int operator<=>(Int64 a, Int64 b)
|
||||
{
|
||||
return (SelfBase)a <=> (SelfBase)b;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue