Esempio n. 1
0
 public __NopeTuple __divmod__(__NopeInteger other)
 {
     return __NopeTuple.Values(
         __floordiv__(other),
         __mod__(other)
     );
 }
Esempio n. 2
0
 public __NopeBoolean __lt__(__NopeInteger other)
 {
     return __NopeBoolean.Value(_value < other._value);
 }
Esempio n. 3
0
 public __NopeInteger __lshift__(__NopeInteger other)
 {
     return Value(_value << other._value);
 }
Esempio n. 4
0
 public __NopeInteger __floordiv__(__NopeInteger other)
 {
     return __NopeInteger.Value(__floordiv__int(_value, other._value));
 }
Esempio n. 5
0
 public __NopeInteger __and__(__NopeInteger other)
 {
     return Value(_value & other._value);
 }
Esempio n. 6
0
 public __NopeFloat __truediv__(__NopeInteger other)
 {
     return __NopeFloat.Value((double)_value / (double)other._value);
 }
Esempio n. 7
0
 public __NopeInteger __xor__(__NopeInteger other)
 {
     return Value(_value ^ other._value);
 }
Esempio n. 8
0
 public __NopeFloat __pow__(__NopeInteger other)
 {
     return __NopeFloat.Value(System.Math.Pow(_value, other._value));
 }
Esempio n. 9
0
 public __NopeInteger __sub__(__NopeInteger other)
 {
     return Value(_value - other._value);
 }
Esempio n. 10
0
 public __NopeInteger __mul__(__NopeInteger other)
 {
     return Value(_value * other._value);
 }
Esempio n. 11
0
 public __NopeInteger __mod__(__NopeInteger other)
 {
     return Value((_value % other._value + other._value) % other._value);
 }
Esempio n. 12
0
 internal static RangeIterator range(__NopeInteger start, __NopeInteger end)
 {
     return new RangeIterator(start.__Value, end.__Value);
 }
Esempio n. 13
0
 public dynamic __getitem__(__NopeInteger key)
 {
     var index = key.__Value;
     return index < 0 ? _values[_values.Length + index] : _values[index];
 }
Esempio n. 14
0
 public void __setitem__(__NopeInteger key, dynamic value)
 {
     _values[key.__Value] = value;
 }