rust/landgen/src/template_based.rs
changeset 14095 b2feb190e4bc
parent 14078 bf40b5f938b0
child 14100 4d22be35cfa2
--- a/rust/landgen/src/template_based.rs	Fri Nov 02 21:30:48 2018 +0300
+++ b/rust/landgen/src/template_based.rs	Fri Nov 02 20:30:22 2018 +0100
@@ -32,9 +32,7 @@
         if self.outline_template.can_mirror {
             if let Some(b) = random_numbers.next() {
                 if b & 1 != 0 {
-                    points
-                        .iter_mut()
-                        .for_each(|p| p.x = land.width() as i32 - 1 - p.x);
+                    points.mirror();
                 }
             }
         }
@@ -43,9 +41,7 @@
         if self.outline_template.can_flip {
             if let Some(b) = random_numbers.next() {
                 if b & 1 != 0 {
-                    points
-                        .iter_mut()
-                        .for_each(|p| p.y = land.height() as i32 - 1 - p.y);
+                    points.flip();
                 }
             }
         }