summaryrefslogtreecommitdiffstats
path: root/lib/rainbow_oscillator.c
diff options
context:
space:
mode:
authorEthan Werner <mail@ethanwerner.com>2026-08-09 15:02:21 +0400
committerEthan Werner <mail@ethanwerner.com>2026-08-09 15:02:21 +0400
commit3d92926a902017e7cf1f5738e99ff62da596ce12 (patch)
tree2b55422c26a48759d56fa91f06df24449e9dfa88 /lib/rainbow_oscillator.c
parent07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff)
refactormain
Diffstat (limited to 'lib/rainbow_oscillator.c')
-rw-r--r--lib/rainbow_oscillator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbow_oscillator.c b/lib/rainbow_oscillator.c
index 1a56b55..463577f 100644
--- a/lib/rainbow_oscillator.c
+++ b/lib/rainbow_oscillator.c
@@ -58,7 +58,7 @@ int ts_rainbow_oscillator(
max_ma = ma_values[p];
}
- if( max_ma == min_ma )
+ if( fabs(max_ma - min_ma) < TS_FILL_ZERO_THRESHOLD )
y[0][i] = 0;
else
y[0][i] = ( x[0][i] - min_ma ) / ( max_ma - min_ma ) * 100.0;