author | alfadur |
Sat, 03 Nov 2018 16:02:38 +0300 | |
changeset 14115 | 1dcd7e5e0aee |
parent 14114 | 9eca6f2cac6d |
child 14116 | 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, )) } }