mirror of
https://github.com/W1NDes/M-AzurLaneAutoScript.git
synced 2026-05-14 07:08:04 +08:00
Fix: [ALAS] insert_swipe() may return a length=1 list after deleting nearing points
This commit is contained in:
parent
04538c4b1a
commit
75333193ea
@ -86,6 +86,8 @@ def insert_swipe(p0, p3, speed=15, min_distance=10):
|
||||
distance = np.linalg.norm(np.subtract(points[1:], points[0]), axis=1)
|
||||
mask = np.append(True, distance > min_distance)
|
||||
points = np.array(points)[mask].tolist()
|
||||
if len(points) <= 1:
|
||||
points = [p0, p3]
|
||||
else:
|
||||
points = [p0, p3]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user