rust/landgen/src/outline_template_based/outline.rs
changeset 16073 5d302b12d837
parent 16058 de01be16df95
--- a/rust/landgen/src/outline_template_based/outline.rs	Tue Jan 28 10:37:46 2025 +0100
+++ b/rust/landgen/src/outline_template_based/outline.rs	Tue Jan 28 15:49:45 2025 +0100
@@ -27,7 +27,7 @@
                 .map(|i| {
                     i.iter()
                         .map(|rect| {
-                            let (rnd_a, rnd_b) = random_numbers.gen();
+                            let (rnd_a, rnd_b) = random_numbers.random();
                             play_box.top_left() + rect.quotient(rnd_a, rnd_b)
                         })
                         .collect::<Vec<_>>()
@@ -241,8 +241,9 @@
             Some(mid_point)
         } else {
             // select distance within [-dist_right; dist_left], keeping min_distance in mind
-            let d = random_numbers
-                .gen_range(-(dist_right as i32) + min_distance..=dist_left as i32 - min_distance);
+            let d = random_numbers.random_range(
+                -(dist_right as i32) + min_distance..=dist_left as i32 - min_distance,
+            );
 
             Some(mid_point + normal * d / normal_len as i32)
         }