rust/landgen/src/outline.rs
changeset 14095 b2feb190e4bc
parent 14093 dbaa125a0fe9
child 14097 400864ecb954
equal deleted inserted replaced
14094:d0b0d61b7d5e 14095:b2feb190e4bc
   189             outline: self,
   189             outline: self,
   190             island: 0,
   190             island: 0,
   191             index: 0,
   191             index: 0,
   192         }
   192         }
   193     }
   193     }
       
   194 
       
   195     pub fn mirror(&mut self) {
       
   196         self.iter_mut()
       
   197             .for_each(|p| p.x = self.size.width() - 1 - p.x);
       
   198     }
       
   199 
       
   200     pub fn flip(&mut self) {
       
   201         points
       
   202             .iter_mut()
       
   203             .for_each(|p| p.y = self.size.height() - 1 - p.y);
       
   204     }
   194 }
   205 }
   195 
   206 
   196 struct OutlineSegmentsIterator<'a> {
   207 struct OutlineSegmentsIterator<'a> {
   197     outline: &'a OutlinePoints,
   208     outline: &'a OutlinePoints,
   198     island: usize,
   209     island: usize,