IndexArea: start at (0,0) for empty range

This commit is contained in:
Michael Sippel 2022-02-13 16:40:05 +01:00
parent 8239b1e8d5
commit 61c2d55441
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -29,7 +29,7 @@ impl IndexArea<Point2<i16>> {
pub fn range(&self) -> RangeInclusive<Point2<i16>> {
match self {
IndexArea::Empty => Point2::new(1, 1)..=Point2::new(0, 0),
IndexArea::Empty => Point2::new(0, 0)..=Point2::new(-1, -1),
IndexArea::Full => panic!("range from full grid area"),
IndexArea::Set(v) => {
Point2::new(