示例#1
0
        static OrderedNumeric()
        {
            OrderedNumeric <short> .InitializeArithmetic(default(Arithmetics.Int16));

            OrderedNumeric <int> .InitializeArithmetic(default(Arithmetics.Int32));

            OrderedNumeric <long> .InitializeArithmetic(default(Arithmetics.Int64));

            OrderedNumeric <ushort> .InitializeArithmetic(default(Arithmetics.UInt16));

            OrderedNumeric <uint> .InitializeArithmetic(default(Arithmetics.UInt32));

            OrderedNumeric <ulong> .InitializeArithmetic(default(Arithmetics.UInt64));

            OrderedNumeric <float> .InitializeArithmetic(default(Arithmetics.Single));

            OrderedNumeric <double> .InitializeArithmetic(default(Arithmetics.Double));

            OrderedNumeric <decimal> .InitializeArithmetic(default(Arithmetics.Decimal));
        }
示例#2
0
 public bool Equals(OrderedNumeric <T> other)
 => Value.Equals(other.Value);
示例#3
0
 public bool Equals <S>(OrderedNumeric <S> other)
     where S : IEquatable <S>, IComparable <S>
 => Value.Equals(other.Value);
示例#4
0
 public int CompareTo(OrderedNumeric <T> other)
 => Implementation.Compare(Value, other.Value);