Coordinate().getLineTo(): handle target == self

This commit is contained in:
Stefan Harmuth 2023-12-18 16:38:11 +01:00
parent ffcc1e14c0
commit fb3bef0153

View File

@ -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: