Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: FastAtan2.h
- Revision:
- 2:8bff2a7afea1
- Parent:
- 1:9110a3da84c9
- Child:
- 3:3f469f0aa3b4
--- a/FastAtan2.h Tue Jun 14 18:00:06 2016 +0000 +++ b/FastAtan2.h Tue Jun 14 19:50:08 2016 +0000 @@ -1,4 +1,4 @@ -/* +/** * FastAtan2.h * * Created on: 22 de may. de 2016 @@ -33,8 +33,22 @@ #define RAD_Q15_TODEG(rad) ((rad*57)+0x25DC) +/** Calculates the arc tangent using fixed point q15 +* @param x Coordinate +* @param y Coordinate +* @returns +* The function returns the principal arc tangent of y/x, in the interval [0,+pi/2] radians in format Q15 +*/ int32_t atan_q15(uint32_t x,uint32_t y); + +/** Calculates the arc tangent using fixed point q15 +* @param x Coordinate +* @param y Coordinate +* @returns +* The function returns the principal arc tangent of y/x, with the correct quadrant in the interval [-pi,+pi] radians in format Q15 +*/ + int32_t atan2_q15(int32_t x,int32_t y);