v-zufallszahl-mit-seed

hio/nwt-gus-hi/v-zufallszahl-mit-seed

No description
v-zufallszahl-mit-seed
@/v-zufallszahl-mit-seed
unteresLimitnumber
oberesLimitnumber
Seedport
Updatepulse
v-zufallszahl-mit-seed
unteresLimit
oberesLimit
Seed
Update
Zahl
Zahlnumber
To use the node in your project you should have the hio/nwt-gus-hi library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

node {
    void evaluate(Context ctx) {
        if (!isInputDirty<input_Update>(ctx))
        return;

        static constexpr typeof_Seed seed = constant_input_Seed;

        auto ll = getValue<input_unteresLimit>(ctx);
        auto ul = getValue<input_oberesLimit>(ctx);
        
        randomSeed(analogRead(seed));
        emitValue<output_Zahl>(ctx, random(ll,ul));


        
    }
}