View Source Randixir (Randixir v0.1.0)
Documentation for Randixir
.
Before using, supply a seed, i.e:
iex> :rand.seed(:exsplus, {13999, 2352, 15231})
Summary
Functions
Generate random float from 0.0 to max, inclusive
Generate random float from min to max (defaulting to 0.0 - 1.0)
Generate random int from 0 to max, inclusive
Generate random int from min to max, both inclusive (defaulting to 0 - 10)
Functions
Generate random float from 0.0 to max, inclusive
Examples
iex> :rand.seed(:exsplus, {13999, 2352, 15231})
iex> Randixir.float(1.0)
0.5365612603062836
Generate random float from min to max (defaulting to 0.0 - 1.0)
Examples
iex> :rand.seed(:exsplus, {13999, 2352, 15231})
iex> Randixir.float(0,1)
0.5365612603062836
Generate random int from 0 to max, inclusive
Examples
iex> :rand.seed(:exsplus, {13999, 2352, 15231})
iex> Randixir.int(5)
4
Generate random int from min to max, both inclusive (defaulting to 0 - 10)
Examples
iex> :rand.seed(:exsplus, {13999, 2352, 15231})
iex> Randixir.int(0,5)
4