fix play area rect
authoralfadur
Sat, 03 Nov 2018 01:47:39 +0300
changeset 14106 ceda58e398e0
parent 14105 4d22be35cfa2
child 14107 c6923ce139a2
fix play area rect
rust/land2d/src/lib.rs
--- a/rust/land2d/src/lib.rs	Fri Nov 02 22:59:22 2018 +0100
+++ b/rust/land2d/src/lib.rs	Sat Nov 03 01:47:39 2018 +0300
@@ -17,7 +17,7 @@
     pub fn new(play_size: Size, fill_value: T) -> Self {
         let real_size = play_size.next_power_of_two();
         let top_left = Point::new(
-            (real_size.width - play_size.width / 2) as i32,
+            ((real_size.width - play_size.width) / 2) as i32,
             (real_size.height - play_size.height) as i32,
         );
         let play_box = Rect::from_size(top_left, play_size);