changeset 14136 | 1dcd7e5e0aee |
parent 14135 | 9eca6f2cac6d |
child 14137 | 83bd383e6d11 |
--- a/rust/landgen/src/outline.rs Sat Nov 03 10:57:47 2018 +0100 +++ b/rust/landgen/src/outline.rs Sat Nov 03 16:02:38 2018 +0300 @@ -210,9 +210,10 @@ + random_numbers.next().unwrap() as i32 % (dist_right as i32 + dist_left as i32 - min_distance * 2); + let norm = p.integral_norm() as i32; Some(Point::new( - mid_point.x + p.x * d / p.integral_norm() as i32, - mid_point.y + p.y * d / p.integral_norm() as i32, + mid_point.x + p.x * d / norm, + mid_point.y + p.y * d / norm, )) } }