@@ -17,16 +17,16 @@ use distributions::float::IntoFloat;
1717/// Sample values uniformly between two bounds.
1818///
1919/// `Range::new` and `Range::new_inclusive` will set up a `Range`, which does
20- /// some preparations up front to make sampeling values faster.
21- /// `Range::sample_single` is optimized for sampeling values once or only a
20+ /// some preparations up front to make sampling values faster.
21+ /// `Range::sample_single` is optimized for sampling values once or only a
2222/// limited number of times from a range.
2323///
2424/// If you need to sample many values from a range, consider using `new` or
2525/// `new_inclusive`. This is also the best choice if the range is constant,
2626/// because then the preparations can be evaluated at compile-time.
2727/// Otherwise `sample_single` may be the best choice.
2828///
29- /// Sampeling uniformly from a range can be surprisingly complicated to be both
29+ /// Sampling uniformly from a range can be surprisingly complicated to be both
3030/// generic and correct. Consider for example edge cases like `low = 0u8`,
3131/// `high = 170u8`, for which a naive modulo operation would return numbers less
3232/// than 85 with double the probability to those greater than 85.
@@ -163,7 +163,7 @@ pub trait RangeImpl: Sized {
163163 /// this.
164164 ///
165165 /// Via this method range implementations can provide a method optimized for
166- /// sampeling only a limited number of values from range. The default
166+ /// sampling only a limited number of values from range. The default
167167 /// implementation just sets up a range with `RangeImpl::new` and samples
168168 /// from that.
169169 fn sample_single < R : Rng + ?Sized > ( low : Self :: X , high : Self :: X , rng : & mut R )
0 commit comments