Revision 83200c22 gnuradio-core/src/lib/general/gr_math.h
| b/gnuradio-core/src/lib/general/gr_math.h | ||
|---|---|---|
| 64 | 64 |
return gr_fast_atan2f(z.imag(), z.real()); |
| 65 | 65 |
} |
| 66 | 66 |
|
| 67 |
static inline float gr_branchless_clip(float x, float clip) |
|
| 68 |
{
|
|
| 69 |
float x1 = fabs(x+clip); |
|
| 70 |
float x2 = fabs(x-clip); |
|
| 71 |
x1 -= x2; |
|
| 72 |
return 0.5*x1; |
|
| 73 |
} |
|
| 74 |
|
|
| 75 |
|
|
| 76 | 67 |
#endif /* _GR_MATH_H_ */ |
Also available in: Unified diff