equal
deleted
inserted
replaced
276 } |
276 } |
277 |
277 |
278 pub fn distort<I: Iterator<Item = u32>>( |
278 pub fn distort<I: Iterator<Item = u32>>( |
279 &mut self, |
279 &mut self, |
280 distance_divisor: u32, |
280 distance_divisor: u32, |
|
281 distortion_limiting_factor: u32, |
281 random_numbers: &mut I, |
282 random_numbers: &mut I, |
282 ) { |
283 ) { |
283 let distortion_limiting_factor = 100 + random_numbers.next().unwrap() as u32 % 8 * 10; |
|
284 |
|
285 loop { |
284 loop { |
286 let old_len = self.total_len(); |
285 let old_len = self.total_len(); |
287 self.divide_edges(distance_divisor, distortion_limiting_factor, random_numbers); |
286 self.divide_edges(distance_divisor, distortion_limiting_factor, random_numbers); |
288 |
287 |
289 if self.total_len() == old_len { |
288 if self.total_len() == old_len { |