RandNif v0.1.0 RandNif View Source
RandNif is a native implementation (NIF) in Rust for random number generator, similar to :rand
module.
Link to this section Summary
Functions
Return a random float distributed in range between 0.0 (inclusive) and 1.0 (exclusive), similary to :rand.uniform/0
Return a positive integer within specified range, similar to :rand.uniform/1
Link to this section Functions
Link to this function
uniform()
View Source
uniform()
View Source
uniform() :: float()
uniform() :: float()
Return a random float distributed in range between 0.0 (inclusive) and 1.0 (exclusive), similary to :rand.uniform/0
.
Link to this function
uniform(n)
View Source
uniform(n)
View Source
uniform(1..4_294_967_295) :: pos_integer()
uniform(1..4_294_967_295) :: pos_integer()
Return a positive integer within specified range, similar to :rand.uniform/1
.
Note that n
should be a positive number less than 2^32
.