From 522a28c26ddbb25b22b8f84208dece83686b5412 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Tue, 30 Jan 2018 12:53:59 +0000 Subject: [PATCH] Improve gen-range doc Fix #167 and #248 --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 48c4acf8d3d..089446084f0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -509,13 +509,14 @@ pub trait Rng { Generator { rng: self, _marker: marker::PhantomData } } - /// Generate a random value in the range [`low`, `high`). + /// Generate a random value in the range [`low`, `high`), i.e. inclusive of + /// `low` and exclusive of `high`. /// /// This is a convenience wrapper around /// `distributions::Range`. If this function will be called /// repeatedly with the same arguments, one should use `Range`, as /// that will amortize the computations that allow for perfect - /// uniformity, as they only happen on initialization. + /// uniformity, as they only happen when constructing the `Range`. /// /// # Panics ///