pub fn walk(&self, n: usize) -> Line2 {
    let mut x = self.start.x;
    let mut y = self.start.y;
    let mut angle = self.angle(self.base_angle);
    (0..n)
      .map(move |_n| {
        angle = self.angle(angle);
        x += angle.cos() * self.velocity;
        y += angle.sin() * self.velocity;
        pt2(x, y)
      })
      .collect()
  }
// not currently used but could be useful in future
not currently used but could be useful in future
not currently used but could be useful in future
pub fn walk(&self, n: usize) -> Line2 {
    let mut x = self.start.x;
    let mut y = self.start.y;
    let mut angle = self.angle(self.base_angle);
    (0..n)
      .map(move |_n| {
        angle = self.angle(angle);
        x += angle.cos() * self.velocity;
        y += angle.sin() * self.velocity;
        pt2(x, y)
      })
      .collect()
  }
pub fn walk ( & self , n : usize ) -> Line2 { let mut x = self . start . x ; let mut y = self . start . y ; let mut angle = self . angle ( self . base_angle ) ; ( 0 .. n ) . map ( move | _n | { angle = self . angle ( angle ) ; x += angle . cos ( ) * self . velocity ; y += angle . sin ( ) * self . velocity ; pt2 ( x , y ) } ) . collect ( ) }
not currently used but could be useful in future
not currently used but could be useful in future
&self
n
usize