Ensure width/height are positive.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
21f79b0528
commit
da413ef4e4
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user