示例#1
0
        public override int Compare(NeoValue other)
        {
            var otherNumber = other.CheckNumber();
            var a           = AsDouble;
            var b           = otherNumber.AsDouble;

            if (a > b)
            {
                return(1);
            }
            else if (a < b)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
示例#2
0
        public override NeoValue Pow(NeoValue other)
        {
            var otherNumber = other.CheckNumber();

            return(Reify(Math.Pow(AsDouble, otherNumber.AsDouble)));
        }
示例#3
0
        public override NeoValue Div(NeoValue other)
        {
            var otherNumber = other.CheckNumber();

            return(Reify(AsDouble / otherNumber.AsDouble));
        }
示例#4
0
 public override NeoValue BitXor(NeoValue other)
 {
     return(NeoInt.ValueOf(AsInt ^ other.CheckNumber().AsInt));
 }
示例#5
0
 public override NeoValue Rsh(NeoValue other)
 {
     return(NeoInt.ValueOf(AsInt >> other.CheckNumber().AsInt));
 }