Пример #1
0
 /// <summary>
 /// Implements the unary `-` operator.
 /// </summary>
 public static BoxedValue minus(BoxedValue o)
 {
     return(BoxedValue.Box((double)(TypeConverter.ToNumber(o) * -1.0)));
 }
Пример #2
0
 /// <summary>
 /// Implements the unary `~` operator.
 /// </summary>
 public static double bitCmpl(BoxedValue value)
 {
     return((double)~TypeConverter.ToInt32(TypeConverter.ToNumber(value)));
 }
Пример #3
0
 /// <summary>
 /// Implements the unary `+` operator.
 /// </summary>
 public static BoxedValue plus(BoxedValue value)
 {
     return(BoxedValue.Box(TypeConverter.ToNumber(value)));
 }
Пример #4
0
 /// <summary>
 /// Implements the unary `!` operator.
 /// </summary>
 public static bool not(BoxedValue value)
 {
     return(!TypeConverter.ToBoolean(value));
 }