MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / smoothStep

Function smoothStep

src/gui/HealthApplet.cpp:45–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45float smoothStep(float edge0, float edge1, float x)
46{
47 if (edge1 <= edge0)
48 return x >= edge1 ? 1.0f : 0.0f;
49 const float t = clamp01((x - edge0) / (edge1 - edge0));
50 return t * t * (3.0f - 2.0f * t);
51}
52
53float finiteOr(float value, float fallback)
54{

Callers 1

computeSeverityMethod · 0.85

Calls 1

clamp01Function · 0.85

Tested by

no test coverage detected