/** * im_col_ab2h: * @a: CIE a * @b: CIE b * * Returns: Hue (degrees) */ double im_col_ab2h( double a, double b ) { double h; /* We have to be careful we have the right quadrant! */ if( a == 0 ) { if( b < 0.0 ) h = 270; else if( b == 0.0 ) h = 0; else h = 90; } else { double t = atan( b / a ); if( a > 0.0 ) if( b < 0.0 ) h = IM_DEG( t + IM_PI * 2.0 ); else h = IM_DEG( t ); else h = IM_DEG( t + IM_PI ); } return( h ); }
static double ip_atan( double a ) { return( IM_DEG( atan( a ) ) ); }
static double ip_acos( double a ) { return( IM_DEG( acos( a ) ) ); }