We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7082dc0 commit 9075b21Copy full SHA for 9075b21
funscript_editor/algorithms/signalprocessing.py
@@ -14,6 +14,7 @@ def scale_signal(signal :list, lower: float = 0, upper: float = 99) -> list:
14
Returns:
15
list: list with scaled signal
16
"""
17
+ if len(signal) == 0: return signal
18
return [(float(upper) - float(lower)) * (x - min(signal)) / (max(signal) - min(signal)) + float(lower) for x in signal]
19
20
0 commit comments