Skip to content

[新功能]变量机制添加随机整数变量 #654

Open
@WangJianG584

Description

@WangJianG584

目前的随机数脚本
setVar:a=random();
只能随机小数部分,可以扩展到整数,但小数点无法舍去
我提议使用
setVar:a=random(int);
提供int范围的整数,如果要规定最大值,可以取余,如果规定最小值就加上对应的数,
如果要同时规定最大值和最小值,变量为a,最大值为b,最小值为c
运算为
setVar:e=a%(b-c)+c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions