Pseudorandom Number Generator

Pseudorandom Number Generator

by -Rex-

👁 462 ❤️ 17 ⭐ 11 🔄 0
Created: Oct 1, 2016 Last modified: Feb 25, 2020 Shared: Oct 1, 2016

Description

Please don't use this PRNG, it's terrible and not even uniformly distributed. Instead, use this: https://scratch.mit.edu/projects/370710866/ INSTRUCTIONS: Type in the minimum and maximum number, then type in the seed. TO USE: The script that generates the pseudorandom numbers should be located at the bottom of the stage. You can backpack it, but make sure to give credit to @-Rex- if you use it. WHY USE THIS?: Scratch's built-in random number block isn't actually truly random, it is pseudorandom, which means it uses a seed (based on the time) and uses a function to convert that seed into numbers that look random, but aren't. This means that if you use the same seed, you will get the same number. However, the built-in random number block doesn't allow you to control the seed, but this custom block does. PLEASE NOTE: This is NOT the best pseudorandom number generation function, it is simply what I came up with when I was bored. INSPIRED BY: https://scratch.mit.edu/projects/122871957/ (which doesn't allow you to enter a seed...)

Project Details

Visibility
Visible
Comments
Enabled