From d08d9c4df06835ba4dc576161eaa00128b210311 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Wed, 6 Mar 2024 13:35:18 +0100 Subject: [PATCH] Removed redundant test in atan2_q15 and q31 --- Source/FastMathFunctions/arm_atan2_q15.c | 11 ++--------- Source/FastMathFunctions/arm_atan2_q31.c | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Source/FastMathFunctions/arm_atan2_q15.c b/Source/FastMathFunctions/arm_atan2_q15.c index 0d04b2f6..73950452 100755 --- a/Source/FastMathFunctions/arm_atan2_q15.c +++ b/Source/FastMathFunctions/arm_atan2_q15.c @@ -1,7 +1,7 @@ /* ---------------------------------------------------------------------- * Project: CMSIS DSP Library * Title: arm_atan2_q15.c - * Description: float32 Arc tangent of y/x + * Description: q15 Arc tangent of y/x * * $Date: 22 April 2022 * $Revision: V1.10.0 @@ -201,14 +201,7 @@ arm_status arm_atan2_q15(q15_t y,q15_t x,q15_t *result) } else { - if (y<0) - { - *result= -PIQ13; - } - else - { - *result= PIQ13; - } + *result= PIQ13; } return(ARM_MATH_SUCCESS); } diff --git a/Source/FastMathFunctions/arm_atan2_q31.c b/Source/FastMathFunctions/arm_atan2_q31.c index 774a67c5..10929512 100755 --- a/Source/FastMathFunctions/arm_atan2_q31.c +++ b/Source/FastMathFunctions/arm_atan2_q31.c @@ -1,7 +1,7 @@ /* ---------------------------------------------------------------------- * Project: CMSIS DSP Library * Title: arm_atan2_q31.c - * Description: float32 Arc tangent of y/x + * Description: q31 Arc tangent of y/x * * $Date: 22 April 2022 * $Revision: V1.10.0 @@ -201,14 +201,7 @@ arm_status arm_atan2_q31(q31_t y,q31_t x,q31_t *result) } else { - if (y<0) - { - *result= -PIQ29; - } - else - { - *result= PIQ29; - } + *result= PIQ29; } return(ARM_MATH_SUCCESS); }