LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

RND_R30

Root / Submissions / [.]

MZ952Created:
Download:QRWJZE8D
Version:Size:
Pseudo-random number generation using Rule 30 cellular automata https://en.wikipedia.org/wiki/Rule_30

Instructions:

I've been seeing a lot of Rule 30 cellular automata on the internet lately and I thought about how something like that could be used for pseudo-random number generation, so uh, here it is.
INIT_RND_R30 Numof_bits, Seed_val_0, Seed_val_1
The initializing function must be called before using the main function. "Numof_bits" specifies the max. range of bits the random number is allowed to, and the two seed values are the dependent values for the random number generation (they must be in the range of "Numof_bits"). A given set of seed values always produce the same random sequence.
RND_R30()
Returns positive pseudorandom value.

Tried uploading this to the new site a few times but it doesn't seem to like me lol