Random Function

Quick test of p5 random() and randomGaussian() functions

p5 extends the Javascript built-in Math.random() with two functions. The first, random([min], [max]), behaves as Math.random with no arguments (random numbers between 0 and 1). One argument is taken as the upper boundary of the generated numbers (exclusive) while two arguments give the inclusive lower and exclusive upper boundaries. Or, you can give it one array argument and it will choose a random element of the array.