mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
9 lines
161 B
C++
9 lines
161 B
C++
|
|
#include "block.h"
|
||
|
|
|
||
|
|
namespace dsp
|
||
|
|
{
|
||
|
|
float branchless_clip(float x, float clip)
|
||
|
|
{
|
||
|
|
return 0.5 * (std::abs(x + clip) - std::abs(x - clip));
|
||
|
|
}
|
||
|
|
};
|