Logo

Programming-Idioms

History of Idiom 15 > diff from v15 to v16

Edit summary for version 16 by :

Version 15

2015-09-02, 15:06:43

Version 16

2015-09-02, 15:09:14

Idiom #15 Pick uniformly a random integer in [a..b]

Pick a random integer greater than or equals to a, inferior or equals to b. Precondition : a < b.

Idiom #15 Pick uniformly a random integer in [a..b]

Pick a random integer greater than or equals to a, inferior or equals to b. Precondition : a < b.

Code
crypto:rand_uniform(A, B)
Comments bubble
Variables in Erlang must begin with capitals.
Doc URL
http://erlang.org/doc/man/crypto.html#rand_uniform-2