diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 12d535830..38f42b743 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -872,14 +872,10 @@ void doLoopCommonActions(); #define BITMASK(bit) (1<<(bit)) -/// liefert Dimension eines Arrays +/// returns the number of elements of an array #define DIM(arr) (sizeof((arr))/sizeof((arr)[0])) -/// liefert Betrag des Arguments -template FORCEINLINE t abs(t a) { return a>0?a:-a; } -/// liefert das Minimum der Argumente template FORCEINLINE t min(t a, t b) { return a FORCEINLINE t max(t a, t b) { return a>b?a:b; } template FORCEINLINE t sgn(t a) { return a>0 ? 1 : (a < 0 ? -1 : 0); } template FORCEINLINE t limit(t mi, t x, t ma) { return min(max(mi,x),ma); }