public static NeoNumber Reify(double value) { if (value % 1 == 0) { return(NeoInt.ValueOf((int)value)); } else { return(NeoFloat.ValueOf(value)); } }
public override NeoValue Length() { var mm = GetMetaMethod("__length"); if (mm != null) { return(mm.Call(new [] { this })); } else { return(NeoInt.ValueOf(data.Count)); } }
public override NeoValue Length() => NeoInt.ValueOf(data.Count);
public override NeoValue BitXor(NeoValue other) { return(NeoInt.ValueOf(AsInt ^ other.CheckNumber().AsInt)); }
public override NeoValue BitNot() { return(NeoInt.ValueOf(~AsInt)); }
public override NeoValue Rsh(NeoValue other) { return(NeoInt.ValueOf(AsInt >> other.CheckNumber().AsInt)); }
public override NeoValue Length() => NeoInt.ValueOf(Scope.LocalCount);