From 70d2ce6cec44b866dd211d9d8fd428698bcb0fd6 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 13 May 2017 16:01:27 +0200 Subject: [PATCH] NFM demod: smoothersterp optimization --- plugins/channelrx/demodnfm/nfmdemod.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/channelrx/demodnfm/nfmdemod.h b/plugins/channelrx/demodnfm/nfmdemod.h index fca1923d0..e74a69ae1 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.h +++ b/plugins/channelrx/demodnfm/nfmdemod.h @@ -247,6 +247,12 @@ private: float smootherstep(float x) { + if (x == 1.0f) { + return 1.0f; + } else if (x == 0.0f) { + return 0.0f; + } + double x3 = x * x * x; double x4 = x * x3; double x5 = x * x4;