From fb3bef0153b31af5cb2e15ee9c7536020faec926 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Mon, 18 Dec 2023 16:38:11 +0100 Subject: [PATCH] Coordinate().getLineTo(): handle target == self --- src/tools/coordinate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/coordinate.py b/src/tools/coordinate.py index 54a4a49..139c4ef 100644 --- a/src/tools/coordinate.py +++ b/src/tools/coordinate.py @@ -233,6 +233,8 @@ class Coordinate(tuple): return 180.0 + abs(angle) def getLineTo(self, target: Coordinate | tuple) -> List[Coordinate]: + if target == self: + return [self] diff = target - self if self[2] is None: