A stateful prng definition.
Statefulness is important to ensure:
rnd
is modifying the state of the prng.A stateful prng definition. Statefulness is important to ensure: * Each call to `rnd` is modifying the state of the prng. * it is thread safe to use.
(as-double prng min-double max-double)
Returns a double generated with prng
between [min-double, max-double[
.
Returns a double generated with `prng` between `[min-double, max-double[`.
(as-int prng min-int max-int)
Returns an integer generated with prng
between [min-int; max-int[
.
Returns an integer generated with `prng` between `[min-int; max-int[`.
(draw-ints prng n min-int max-int)
Draw n
random integers with prng
, between [min-int; max-int[
.
Draw `n` random integers with `prng`, between `[min-int; max-int[`.
(duplicate _)
Duplicates this prng to a new one, starting at the seed value.
Duplicates this prng to a new one, starting at the seed value.
(jump _)
Jump to a completly different place.
Jump to a completly different place.
(reset _)
Returns a prng that starts again at the seed value.
Returns a prng that starts again at the seed value.
(rnd _)
Returns a random number and change the state of the prng so next call will return a new value.
Returns a random number and change the state of the prng so next call will return a new value.
(rnd-range _)
Returns the range in which rnd is returned.
Returns the range in which rnd is returned.
(seed _)
Returns the seed of the random number generator.
Returns the seed of the random number generator.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close