equal
deleted
inserted
replaced
208 let d = -(dist_right as i32) |
208 let d = -(dist_right as i32) |
209 + min_distance |
209 + min_distance |
210 + random_numbers.next().unwrap() as i32 |
210 + random_numbers.next().unwrap() as i32 |
211 % (dist_right as i32 + dist_left as i32 - min_distance * 2); |
211 % (dist_right as i32 + dist_left as i32 - min_distance * 2); |
212 |
212 |
|
213 let norm = p.integral_norm() as i32; |
213 Some(Point::new( |
214 Some(Point::new( |
214 mid_point.x + p.x * d / p.integral_norm() as i32, |
215 mid_point.x + p.x * d / norm, |
215 mid_point.y + p.y * d / p.integral_norm() as i32, |
216 mid_point.y + p.y * d / norm, |
216 )) |
217 )) |
217 } |
218 } |
218 } |
219 } |
219 |
220 |
220 fn divide_edges<I: Iterator<Item = u32>>( |
221 fn divide_edges<I: Iterator<Item = u32>>( |