The d3-random module, which is also part of the default bundle, provides generator functions with algorithms to create random sequences with different distributions. These functions are listed as follows:
Function |
Description |
d3.randomUniform(min, max) |
Returns a function that generates random numbers using a uniform distribution (same as Math.random()), between the optional arguments min (default 0) and max (default 1). |
d3.randomNormal(mu, sigma) |
Returns a random number generator for a normal distribution with the expected value mu (default 0) and the deviation sigma (default 1). |
d3.randomLogNormal(mu, sigma) |
Returns a random number generator for a natural logarithmic normal distribution with an expected value mu (default 0) and the deviation sigma (default 1). |
d3.randomBates(n) |
Returns a random number generator for a Bates distribution... |