SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Static Public Member Functions | List of all members
StepFunctions Class Reference

#include <stepfunctions.h>

Static Public Member Functions

static float smootherstep (float x)
 

Detailed Description

Definition at line 21 of file stepfunctions.h.

Member Function Documentation

◆ smootherstep()

static float StepFunctions::smootherstep ( float  x)
inlinestatic

Definition at line 24 of file stepfunctions.h.

Referenced by MagAGC::feedAndGetValue(), MagAGC::getStepValue(), AMDemod::processOneSample(), and CWSmoother::setNbFadeSamples().

25  {
26  if (x == 1.0f) {
27  return 1.0f;
28  } else if (x == 0.0f) {
29  return 0.0f;
30  }
31 
32  double x3 = x * x * x;
33  double x4 = x * x3;
34  double x5 = x * x4;
35 
36  return (float) (6.0*x5 - 15.0*x4 + 10.0*x3);
37  }
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: