swap coordinate system
authoralfadur
Sat, 03 Nov 2018 02:31:21 +0300
changeset 14112 6a3bcb7c2981
parent 14111 5c1ce63114a5
child 14113 36b792842d5b
swap coordinate system
rust/integral-geometry/src/lib.rs
rust/landgen/src/outline.rs
--- a/rust/integral-geometry/src/lib.rs	Sat Nov 03 02:21:45 2018 +0300
+++ b/rust/integral-geometry/src/lib.rs	Sat Nov 03 02:31:21 2018 +0300
@@ -61,7 +61,7 @@
 
     #[inline]
     pub fn rotate90(self) -> Self {
-        Point::new(-self.y, self.x)
+        Point::new(self.y, -self.x)
     }
 }
 
--- a/rust/landgen/src/outline.rs	Sat Nov 03 02:21:45 2018 +0300
+++ b/rust/landgen/src/outline.rs	Sat Nov 03 02:31:21 2018 +0300
@@ -105,7 +105,7 @@
         // new point should fall inside this box
         let map_box = self.play_box.with_margin(min_distance);
 
-        let p = -segment.scaled_normal();
+        let p = segment.scaled_normal();
         let mid_point = segment.center();
 
         if (p.integral_norm() < min_distance as u32 * 3) || !map_box.contains_inside(mid_point) {