diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-15 23:08:14 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-15 23:08:14 +0000 |
commit | 3f13e2dc6676057010ccdf57df776304e8cdef7f (patch) | |
tree | fa4f2d1657d900e099dfe91bfe3ceeca6f6a9f18 /utils.py | |
parent | 1d30fd93e2b18b10c75638bfd27811244371d2f2 (diff) | |
download | aoc2021-3f13e2dc6676057010ccdf57df776304e8cdef7f.tar.gz aoc2021-3f13e2dc6676057010ccdf57df776304e8cdef7f.tar.xz aoc2021-3f13e2dc6676057010ccdf57df776304e8cdef7f.zip |
wip3: eh, good enoughtyping-madness
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]]: |