Propagate walker change of behaviour to rust code
This commit is contained in:
@@ -17,7 +17,7 @@ impl LocalRandomWalker {
|
||||
impl<R: Rng> Walker<R> for LocalRandomWalker {
|
||||
fn walk(&self, rng: &mut R, position: &Position) -> Position {
|
||||
let (dim, sign) = rng.gen_range(0u32..(DIM * 2)).div_rem(&self.dim);
|
||||
let sign = if sign == 0 { -1 } else { 1 };
|
||||
let sign = if sign == 0 { 1 } else { -1 };
|
||||
let offset = Position::in_direction(dim, sign);
|
||||
|
||||
position.clone() + offset
|
||||
|
||||
Reference in New Issue
Block a user