summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index 607d9d8..00d0d60 100644
--- a/utils.py
+++ b/utils.py
@@ -44,7 +44,7 @@ def inbounds(p: Point2D[NumT], a: Point2D[NumT], _b: Optional[Point2D[NumT]] = N
b = _b
else:
b = a
- a = cast(Point2D[NumT], Point2D(0, 0))
+ a = cast(Point2D[NumT], Point2D(0, 0) if isinstance(a.x, int) else Point2D(0.0, 0.0))
return p.x >= a.x and p.y >= a.y and p.x < b.x and p.y < b.y
def adjacent(p: Point2D[int], diagonal: bool = True) -> Iterator[Point2D[int]]: