Ensure width/height are positive.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nolan Darilek 2022-07-25 14:20:15 -05:00
parent 21f79b0528
commit da413ef4e4

View File

@ -88,8 +88,8 @@ impl Viewshed {
let shape = Collider::cuboid(0.5, 0.5);
let mut new_visible_entities = HashSet::new();
let size = (
(start.translation.x + self.range as f32) as u32,
(start.translation.y + self.range as f32) as u32,
(start.translation.x.abs() + self.range as f32) as u32,
(start.translation.y.abs() + self.range as f32) as u32,
);
let visibility_grid = VisibilityGrid(
size,