If you write generative code, you have undoubtedly used a random number generator to pick values.
Sometimes, you might want to vary the probability of a number being picked.
Click on the above buttons to compare the probability distribution of five different types of randomness.
Here's a brief summary of the different types:
- Uniform - Each number has an equal probability of being picked.
- Linear - The higher the number, the greater the probability it will be picked.
- Inverse Linear - The lower the number, the greater the probability it will be picked.
- Triangle - The closer a number is to the middle of the range, the greater the probability it will be picked.
- Inverse Triangle - The closer a number is to the extremes of the range, the greater the probability it will be picked.