Propagate walker change of behaviour to rust code
This commit is contained in:
parent
da53077f9a
commit
0a56c6f83f
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user