rust/landgen/src/outline.rs
changeset 14130 ab280be4b617
parent 14126 32383b888309
child 14132 95360f56db38
--- a/rust/landgen/src/outline.rs	Sun Nov 04 07:19:58 2018 +0300
+++ b/rust/landgen/src/outline.rs	Sun Nov 04 10:52:02 2018 +0100
@@ -110,7 +110,7 @@
                     (iy - s.y) * f.x / f.y + s.x
                 };
 
-                let intersection_point = Point::new(ix, iy);
+                let intersection_point = Point::new(ix, iy).fit(intersections_box);
                 let diff_point = m - intersection_point;
                 let t = p.dot(diff_point);
                 if diff_point.max_norm() >= std::i16::MAX as i32 {