uce/site/doc/pages/draw_float.txt

21 lines
646 B
Plaintext

:sig
f64 draw_float(f64 from, f64 to)
:params
from : minimum value
to : maximum value
return value : a noise value between 'from' and 'to'
:see
>noise
:content
Works like `generate_float()`, but uses `context.random_index` for the index value and `context.random_seed` for the seed.
After each call, `context.random_index` is increased by one. At the start of every request, `context.random_seed` is automatically populated with a new seed value.
## Related Concepts
- PHP: `random_int()`, `mt_rand()`, and custom numeric random helpers
- JavaScript / Node.js: `Math.random()` or `crypto.getRandomValues()`-based helpers for numeric ranges