equal
deleted
inserted
replaced
103 |
103 |
104 let min_distance = 40; |
104 let min_distance = 40; |
105 // new point should fall inside this box |
105 // new point should fall inside this box |
106 let map_box = self.play_box.with_margin(min_distance); |
106 let map_box = self.play_box.with_margin(min_distance); |
107 |
107 |
108 let p = -segment.scaled_normal(); |
108 let p = segment.scaled_normal(); |
109 let mid_point = segment.center(); |
109 let mid_point = segment.center(); |
110 |
110 |
111 if (p.integral_norm() < min_distance as u32 * 3) || !map_box.contains_inside(mid_point) { |
111 if (p.integral_norm() < min_distance as u32 * 3) || !map_box.contains_inside(mid_point) { |
112 return None; |
112 return None; |
113 } |
113 } |