rust/landgen/src/outline.rs
changeset 14124 8556937ae338
parent 14121 4d22be35cfa2
child 14125 e2b6ff0421ec
equal deleted inserted replaced
14123:c6923ce139a2 14124:8556937ae338
   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;