Compare() private méthode

private Compare ( BinaryOpStorage coercionStorage, BinaryOpStorage comparisonStorage, double self, object other ) : object
coercionStorage BinaryOpStorage
comparisonStorage BinaryOpStorage
self double
other object
Résultat object
Exemple #1
0
        public static object Compare(RubyContext /*!*/ context, BigInteger /*!*/ self, double other)
        {
            var result = ClrFloat.Compare(context, other, self);

            if (result == null)
            {
                return(null);
            }

            int i = (int)result;

            return((i == 0) ? ClrInteger.Zero : (i < 0) ? ClrInteger.One : ClrInteger.MinusOne);
        }
Exemple #2
0
 public static object Compare(RubyContext /*!*/ context, BigInteger /*!*/ self, double other)
 {
     return(ClrFloat.Compare(ToFloat(context, self), other));
 }