uce/site/doc/pages/draw_int.txt
2026-06-16 12:21:31 +00:00

20 lines
507 B
Plaintext

:sig
u64 draw_int(u64 from, u64 to)
:params
from : minimum value
to : maximum value
return value : a noise value between 'from' and 'to'
:see
>noise
:content
Works like `generate_int()`, 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.
:example
print(draw_int(1, 10) >= 1 ? "int\n" : "bad\n");