Random Numbers

Post Reply
darrellp
Posts: 2
Joined: Sun Apr 05, 2020 6:49 pm

Random Numbers

Post by darrellp »

So what's the best way to generate random numbers? I don't see anything for this in the libraries. I can write a random number generator on my own but I still need to seed it. My guess is that I can use the noise generator to seed it but I'm not sure if I create a noise generator whether it's going to always give the same random sequence in which case it wouldn't be good for a seed or if it's "running in the background all the time" so when I get it is just some random spot in it's ongoing random sequence in which case it's probably fine for a seed. I'm just curious what other people are doing here and if perhaps I missed a library call which will handle it without any effort on my part.
User avatar
nekomatic
Posts: 64
Joined: Mon Jul 08, 2019 8:52 pm

Re: Random Numbers

Post by nekomatic »

in VM - Noise + sample and hold, in code - java.lang.Math.random()
darrellp
Posts: 2
Joined: Sun Apr 05, 2020 6:49 pm

Re: Random Numbers

Post by darrellp »

Doh! Yes, I saw this just after posting. I guess I didn't realize I had the standard Java libraries available to me. Color me red with embarrassment.
Post Reply

Return to “Module Designer”