equal
deleted
inserted
replaced
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 = Point::new( |
108 let p = Point::new( |
109 segment.end.y - segment.start.y, |
109 segment.end.y - segment.start.y, |
110 segment.start.x - segment.start.y, |
110 segment.start.x - segment.end.x, |
111 ); |
111 ); |
112 let mid_point = segment.center(); |
112 let mid_point = segment.center(); |
113 |
113 |
114 if (p.integral_norm() < min_distance as u32 * 3) || !map_box.contains_inside(p) { |
114 if (p.integral_norm() < min_distance as u32 * 3) || !map_box.contains_inside(p) { |
115 return None; |
115 return None; |