JanetDocsPlaygroundI'm feeling luckyGitHub sign in

math/rng-uniform



    cfunction
    src/core/math.c on line 145, column 1

    (math/rng-uniform rng)

    Extract a random number in the range [0, 1) from the RNG.


2 examplesSign in to add an example
Loading...
(let [seed 0]
  (= (math/rng-uniform (math/rng seed))
     (math/rng-uniform (math/rng seed))))
# => true
sogaiuPlayground
(math/rng-uniform (math/rng 0))
# => 0.487181
sogaiuPlayground