mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
libds/lib_misc: use b16abs()
This commit is contained in:
parent
0e4f4a8b67
commit
b656fdbc86
1 changed files with 1 additions and 5 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue