Questions on how p5.js generates random numbers

Hi all,

How does p5.js generate random numbers?
What type of PRNG does it use?
Does it use javascripts random function? If so how does that work?
Where is the code that generates random numbers?
is there anything interesting i should know?

Many thanks,
reacttoimpact

1 Like

Hi @reacttoimpact,

here some sources …

Cheers
— mnse

js random numbers:

p5js source:

4 Likes