public DyObject Max(ExecutionContext ctx, DyObject x, DyObject y) { if (x.Type(ctx).Gt(ctx, x, y).GetBool()) { return(x); } else { return(y); } }
public DyObject Sign(ExecutionContext ctx, DyObject x) { if (x == DyInteger.Zero) { return(DyInteger.Zero); } if (x.Type(ctx).Lt(ctx, x, DyInteger.Zero).GetBool()) { return(DyInteger.MinusOne); } else { return(DyInteger.One); } }