Skip to content

Commit d08d9c4

Browse files
Removed redundant test in atan2_q15 and q31
1 parent 53e3e33 commit d08d9c4

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

Source/FastMathFunctions/arm_atan2_q15.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* ----------------------------------------------------------------------
22
* Project: CMSIS DSP Library
33
* Title: arm_atan2_q15.c
4-
* Description: float32 Arc tangent of y/x
4+
* Description: q15 Arc tangent of y/x
55
*
66
* $Date: 22 April 2022
77
* $Revision: V1.10.0
@@ -201,14 +201,7 @@ arm_status arm_atan2_q15(q15_t y,q15_t x,q15_t *result)
201201
}
202202
else
203203
{
204-
if (y<0)
205-
{
206-
*result= -PIQ13;
207-
}
208-
else
209-
{
210-
*result= PIQ13;
211-
}
204+
*result= PIQ13;
212205
}
213206
return(ARM_MATH_SUCCESS);
214207
}

Source/FastMathFunctions/arm_atan2_q31.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* ----------------------------------------------------------------------
22
* Project: CMSIS DSP Library
33
* Title: arm_atan2_q31.c
4-
* Description: float32 Arc tangent of y/x
4+
* Description: q31 Arc tangent of y/x
55
*
66
* $Date: 22 April 2022
77
* $Revision: V1.10.0
@@ -201,14 +201,7 @@ arm_status arm_atan2_q31(q31_t y,q31_t x,q31_t *result)
201201
}
202202
else
203203
{
204-
if (y<0)
205-
{
206-
*result= -PIQ29;
207-
}
208-
else
209-
{
210-
*result= PIQ29;
211-
}
204+
*result= PIQ29;
212205
}
213206
return(ARM_MATH_SUCCESS);
214207
}

0 commit comments

Comments
 (0)