Computing Arc tangent only using the ratio y/x is not enough to determine the angle since there is an indeterminacy. Opposite quadrants are giving the same ratio.
ArcTan2 is not using y/x to compute the angle but y and x and use the sign of y and x to determine the quadrant.
arm_status arm_atan2_f16 |
( |
float16_t |
y, |
|
|
float16_t |
x, |
|
|
float16_t * |
result |
|
) |
| |
Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
- Parameters
-
[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result |
- Returns
- error status.
- Compute the Arc tangent of y/x:
- The sign of y and x are used to determine the right quadrant and compute the right angle.
Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
- Parameters
-
[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result |
- Returns
- error status.
- Compute the Arc tangent of y/x:
- The sign of y and x are used to determine the right quadrant and compute the right angle.
Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
- Parameters
-
[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result in Q2.13 |
- Returns
- error status.
- Compute the Arc tangent of y/x:
- The sign of y and x are used to determine the right quadrant and compute the right angle.
Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
- Parameters
-
[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result in Q2.29 |
- Returns
- error status.
- Compute the Arc tangent of y/x:
- The sign of y and x are used to determine the right quadrant and compute the right angle.