function | since v0.0-927 | clojure.core/rand | Edit |
(rand)
(rand n)
Returns a random floating point number between 0 inclusive and n
exclusive.
n
defaults to 1.
Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).
(defn rand
([] (rand 1))
([n] (* (Math/random) n)))