Esempio n. 1
0
 public override bool Lte(JSNumberValue value)
 {
     if (value.Type != JSValueType.Integer)
     {
         return(_value <= value.CastToFloat());
     }
     return(_value <= value.CastToInteger());
 }
Esempio n. 2
0
 public override JSNumberValue Mul(JSNumberValue value)
 {
     if (value.Type != JSValueType.Integer)
     {
         return(_value * value.CastToFloat());
     }
     return(unchecked (_value * value.CastToInteger()));
 }
Esempio n. 3
0
 public override JSNumberValue Mod(JSNumberValue value)
 {
     if (value.Type != JSValueType.Integer)
     {
         return(_value % value.CastToFloat());
     }
     return(_value % value.CastToInteger());
 }
Esempio n. 4
0
 public override bool Lte(JSNumberValue value)
 {
     return(_value <= value.CastToFloat());
 }
Esempio n. 5
0
 public override JSNumberValue Mod(JSNumberValue value)
 {
     return(_value % value.CastToFloat());
 }
Esempio n. 6
0
 public override JSNumberValue Minus(JSNumberValue value)
 {
     return(_value - value.CastToFloat());
 }
Esempio n. 7
0
 public abstract bool Lte(JSNumberValue value);
Esempio n. 8
0
 public override JSNumberValue ToNumber()
 {
     return(JSNumberValue.ParseNumber(_value));
 }
Esempio n. 9
0
 public JSNumberValue BitShrU(JSNumberValue value)
 {
     Contract.Requires(value != null);
     return((int)((uint)CastToInteger() >> value.CastToInteger()));
 }
Esempio n. 10
0
 public JSNumberValue BitShl(JSNumberValue value)
 {
     Contract.Requires(value != null);
     return(CastToInteger() << value.CastToInteger());
 }
Esempio n. 11
0
 public virtual JSNumberValue Mod(JSNumberValue value)
 {
     Contract.Requires(value != null);
     throw new NotSupportedException();
 }
Esempio n. 12
0
 public JSNumberValue FltDiv(JSNumberValue value)
 {
     Contract.Requires(value != null);
     return(CastToFloat() / value.CastToFloat());
 }
Esempio n. 13
0
 public JSNumberValue IntDiv(JSNumberValue value)
 {
     Contract.Requires(value != null);
     Contract.Ensures(Contract.Result <JSNumberValue>().Type == JSValueType.Integer);
     return(CastToInteger() / value.CastToInteger());
 }