changeset 14095 | b2feb190e4bc |
parent 14093 | dbaa125a0fe9 |
child 14097 | 400864ecb954 |
--- a/rust/landgen/src/outline.rs Fri Nov 02 21:30:48 2018 +0300 +++ b/rust/landgen/src/outline.rs Fri Nov 02 20:30:22 2018 +0100 @@ -191,6 +191,17 @@ index: 0, } } + + pub fn mirror(&mut self) { + self.iter_mut() + .for_each(|p| p.x = self.size.width() - 1 - p.x); + } + + pub fn flip(&mut self) { + points + .iter_mut() + .for_each(|p| p.y = self.size.height() - 1 - p.y); + } } struct OutlineSegmentsIterator<'a> {