- Fix land_dump always skipping bezierize step
authorunc0rr
Sun, 04 Nov 2018 10:52:02 +0100
changeset 14151 ab280be4b617
parent 14150 703242ade2c1
child 14153 95360f56db38
- Fix land_dump always skipping bezierize step - Fix ix overflow too
rust/land_dump/src/main.rs
rust/landgen/src/outline.rs
--- a/rust/land_dump/src/main.rs	Sun Nov 04 07:19:58 2018 +0300
+++ b/rust/land_dump/src/main.rs	Sun Nov 04 10:52:02 2018 +0100
@@ -131,7 +131,7 @@
         opt.seed.as_str().as_bytes(),
         opt.distance_divisor,
         false,
-        true,
+        false,
         Path::new("out.full.png"),
     )
     .unwrap();
--- 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 {