From 61c2d55441b2302e2574d12521aed501e129af44 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Sun, 13 Feb 2022 16:40:05 +0100 Subject: [PATCH] IndexArea: start at (0,0) for empty range --- nested/src/grid/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nested/src/grid/mod.rs b/nested/src/grid/mod.rs index ec49777..87f722f 100644 --- a/nested/src/grid/mod.rs +++ b/nested/src/grid/mod.rs @@ -29,7 +29,7 @@ impl IndexArea> { pub fn range(&self) -> RangeInclusive> { 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(