Random numbers from the uniform distribution. Equivalent to R's runif().
runif()
Number of values to generate (fractions are truncated, as in R).
Optional
Upper limit. Default 1.
1
Lower limit. Default 0.
0
An array of n values; NaN for invalid parameters.
n
NaN
setSeed(1);runif(3); // [0.2655087, 0.3721239, 0.5728534]runif(2, { min: -1, max: 1 }); Copy
setSeed(1);runif(3); // [0.2655087, 0.3721239, 0.5728534]runif(2, { min: -1, max: 1 });
Random numbers from the uniform distribution. Equivalent to R's
runif().