mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 10:08:00 +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 UInt64 : uint64, IInteger, IUnsigned, IHashable, IIsNaN, IFormattable, IParseable<uint64, ParseError>, IParseable<uint64>
|
||||
struct UInt64 : uint64, IInteger, IUnsigned, IHashable, IIsNaN, IFormattable, IParseable<uint64, ParseError>, IParseable<uint64>, IMinMaxValue<uint64>
|
||||
{
|
||||
public enum ParseError
|
||||
{
|
||||
|
@ -16,6 +16,9 @@ namespace System
|
|||
public const uint64 MaxValue = 0xFFFFFFFFFFFFFFFFUL;
|
||||
public const uint64 MinValue = 0;
|
||||
|
||||
public static uint64 IMinMaxValue<uint64>.MinValue => MinValue;
|
||||
public static uint64 IMinMaxValue<uint64>.MaxValue => MaxValue;
|
||||
|
||||
public static int operator<=>(UInt64 a, UInt64 b)
|
||||
{
|
||||
return (SelfBase)a <=> (SelfBase)b;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue