mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-21 19:13:07 +00:00
Update language to not reference examples 'above'
This commit is contained in:
parent
c399dc4b7d
commit
1f0d3c9785
1 changed files with 5 additions and 4 deletions
|
@ -192,10 +192,11 @@ fn main() {
|
|||
|
||||
[![rand-badge]][rand] [![cat-science-badge]][cat-science]
|
||||
|
||||
You've already seen how to create numbers with uniform distribution [above][ex-rand-range]
|
||||
(using [`Range`]). Other distributions are used in the same way: create a distribution, then
|
||||
sample from that distribution (using [`IndependentSample::ind_sample`]) with the help of
|
||||
a random-number generator (`rng`).
|
||||
By default, random numbers are generated with a uniform distribution.
|
||||
To generate numbers with other distributions you create a
|
||||
distribution, then sample from that distribution (using
|
||||
[`IndependentSample::ind_sample`]) with the help of a random-number
|
||||
generator (`rng`).
|
||||
|
||||
The [distributions available are documented here][rand-distributions]. An example using the
|
||||
[`Normal`] distribution is shown below.
|
||||
|
|
Loading…
Reference in a new issue