Skip to content

Commit

Permalink
Fixed tile positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurble authored and dmtaub committed Mar 15, 2021
1 parent 1506b55 commit 8d1d2ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ impl Map {
);

let start = Vec2::new(
center.x() - tile_width / 2.0,
center.y() - tile_height / 2.0,
center.x(),
center.y() - tile_height,
);

let end = Vec2::new(
center.x() + tile_width / 2.0,
center.y() + tile_height / 2.0,
center.x() + tile_width,
center.y(),
);

(start.x(), end.x(), start.y(), end.y())
Expand All @@ -199,12 +199,12 @@ impl Map {

let start = Vec2::new(
center.x() - tile_width / 2.0,
center.y() - tile_height / 2.0,
center.y() - tile_height,
);

let end = Vec2::new(
center.x() + tile_width / 2.0,
center.y() + tile_height / 2.0,
center.y(),
);

(start.x(), end.x(), start.y(), end.y())
Expand Down

0 comments on commit 8d1d2ab

Please sign in to comment.