added doc / Update robot.rs

This commit is contained in:
stephane elias benabdeslam 2020-11-08 17:38:19 +01:00
parent 9b99bf25fd
commit e2de2af94b

View File

@ -56,6 +56,7 @@ pub enum Orientation {
} }
impl Distribution<Orientation> for Standard { impl Distribution<Orientation> for Standard {
/// Generating random orientation.
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Orientation { fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Orientation {
match rng.gen_range(0, 3) { match rng.gen_range(0, 3) {
0 => Orientation::N, 0 => Orientation::N,