Creates an iterable that yields random floats in the provided range or from 0 to 1 if the range argument is omitted.
An iterable of random float values.
for (const n of randomFloats([0.1, 9.9])) { console.log(n); // Logs random float values between 0.1 and 9.9 (inclusive)}
Optional
An optional range [min, max] to generate random floats within.
An optional custom generator function that returns a random number.
Generated using TypeDoc
Creates an iterable that yields random floats in the provided range or from 0 to 1 if the range argument is omitted.
Returns
An iterable of random float values.
Example