You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@param b Pointer to numerator input vector
void p_atan2_f32(const float *a, const float *b, float *c, int n)
Contrast this with atan2 ISO/IEC 9899:1999 (E)
The atan2 functions compute the value of the arc tangent of y/x, using the signs of both
arguments to determine the quadrant of the return value. A domain error may occur if
both arguments are zero.
double atan2(double y, double x);
In my impression, the signature of atan2(y, x) becomes atan(y/x) with some edge conditions.
However, the signature of p_atan2(a, b, ...) becomes atan(b/a) [or equivalently p_atan2(y, x, ...) becomes atan(x/y)].
Isn't this inverted? Is it intentional?
The text was updated successfully, but these errors were encountered:
@twocs
It's obviously inverted and it probably wasn't intentional. Breaking an API should generally be avoided, but this software is still under development, so you should put in a pull request to patch it.
Looking at the relevant lines of p_atan2.c at https://github.com/parallella/pal/edit/master/src/math/p_atan2.c
void p_atan2_f32(const float *a, const float *b, float *c, int n)
Contrast this with atan2 ISO/IEC 9899:1999 (E)
The atan2 functions compute the value of the arc tangent of y/x, using the signs of both
arguments to determine the quadrant of the return value. A domain error may occur if
both arguments are zero.
double atan2(double y, double x);
In my impression, the signature of atan2(y, x) becomes atan(y/x) with some edge conditions.
However, the signature of p_atan2(a, b, ...) becomes atan(b/a) [or equivalently p_atan2(y, x, ...) becomes atan(x/y)].
Isn't this inverted? Is it intentional?
The text was updated successfully, but these errors were encountered: