From b656fdbc8659b60e00e3932f7e27fa9f13f1bea2 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sat, 7 Oct 2023 11:59:47 +0200 Subject: [PATCH] libds/lib_misc: use b16abs() --- libs/libdsp/lib_misc_b16.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libs/libdsp/lib_misc_b16.c b/libs/libdsp/lib_misc_b16.c index 7319ab6ef32..6005a98a799 100644 --- a/libs/libdsp/lib_misc_b16.c +++ b/libs/libdsp/lib_misc_b16.c @@ -31,10 +31,6 @@ #define VECTOR2D_SATURATE_MAG_MIN (1) #define FAST_ATAN2_SMALLNUM (1) -#ifndef ABS -# define ABS(a) ((a) < 0 ? -(a) : (a)) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -327,7 +323,7 @@ b16_t fast_atan2_b16(b16_t y, b16_t x) /* Get absolute value of y and add some small number to prevent 0/0 */ - abs_y = ABS(y) + FAST_ATAN2_SMALLNUM; + abs_y = b16abs(y) + FAST_ATAN2_SMALLNUM; /* Calculate angle */