add a note about atan2() use in complex.c

see https://github.com/libvips/libvips/pull/1728
This commit is contained in:
John Cupitt 2020-07-20 13:34:41 +01:00
parent 8eefe9f4fb
commit cba371a9ba
1 changed files with 5 additions and 0 deletions

View File

@ -136,6 +136,8 @@ vips_complex_hypot( double a, double b )
{
double d;
/* hypot() is less sensitive to overflow. Use it if we can.
*/
#ifdef HAVE_HYPOT
d = hypot( a, b );
#else
@ -150,6 +152,9 @@ vips_complex_atan2( double a, double b )
{
double h;
/* atan2() is very slow, but is better behaved when a is near 0. Use
* it in preference when we can.
*/
#ifdef HAVE_ATAN2
h = VIPS_DEG( atan2( b, a ) );
if( h < 0.0 )