Coordinate().getLineTo(): handle target == self
This commit is contained in:
parent
ffcc1e14c0
commit
fb3bef0153
@ -233,6 +233,8 @@ class Coordinate(tuple):
|
|||||||
return 180.0 + abs(angle)
|
return 180.0 + abs(angle)
|
||||||
|
|
||||||
def getLineTo(self, target: Coordinate | tuple) -> List[Coordinate]:
|
def getLineTo(self, target: Coordinate | tuple) -> List[Coordinate]:
|
||||||
|
if target == self:
|
||||||
|
return [self]
|
||||||
diff = target - self
|
diff = target - self
|
||||||
|
|
||||||
if self[2] is None:
|
if self[2] is None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user