We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84042df commit e0dc542Copy full SHA for e0dc542
1 file changed
crossfade.py
@@ -6,6 +6,6 @@ def cross_fade(a: np.ndarray, b: np.ndarray, idx: int):
6
fade_len = a.shape[0] - idx
7
np.copyto(result[:idx], a[:idx])
8
k = np.linspace(0, 1.0, num=fade_len, endpoint=True)
9
- result[idx: a.shape[0]] = k * a[idx:] + (1 - k) * b[: fade_len]
+ result[idx: a.shape[0]] = (1 - k) * a[idx:] + k * b[: fade_len]
10
np.copyto(b[fade_len:], result[a.shape[0]:])
11
return result
0 commit comments