data_source v0.1.3 Datasource.Random

Can be used in Datasource as the function-argument. It generates random float numbers between 0.0 and 1.0

Link to this section Summary

Functions

Get a random number between 0.0 and 1.0

Link to this section Functions

Get a random number between 0.0 and 1.0

Examples:

iex> {:ok, random_source} = Datasource.start_link(nil, &Datasource.Random.next/1)
...> [a,b,c,d,e] = (1..5) |> Enum.map( fn(_i) -> Datasource.next(random_source) end)
...> assert a != b
...> assert b != c
...> assert c != d
...> assert d != e
true