+ use std::abs
This commit is contained in:
parent
465842e0e4
commit
0668fe2958
1 changed files with 4 additions and 4 deletions
|
@ -61,8 +61,8 @@ struct default_color_converter_impl< rgb_t, hsv_t >
|
|||
|
||||
bits32f hue, saturation, value;
|
||||
|
||||
bits32f min_color = (std::min)( temp_red, (std::min)( temp_green, temp_blue ));
|
||||
bits32f max_color = (std::max)( temp_red, (std::max)( temp_green, temp_blue ));
|
||||
bits32f min_color = std::min(temp_red,std::min(temp_green, temp_blue));
|
||||
bits32f max_color = std::max(temp_red,std::max(temp_green, temp_blue));
|
||||
|
||||
value = max_color;
|
||||
|
||||
|
@ -85,7 +85,7 @@ struct default_color_converter_impl< rgb_t, hsv_t >
|
|||
}
|
||||
else
|
||||
{
|
||||
if( (std::abs)( boost::numeric_cast<int>(temp_red - max_color) ) < 0.0001f )
|
||||
if( std::abs( boost::numeric_cast<int>(temp_red - max_color) ) < 0.0001f )
|
||||
{
|
||||
hue = ( temp_green - temp_blue )
|
||||
/ diff;
|
||||
|
@ -129,7 +129,7 @@ struct default_color_converter_impl<hsv_t,rgb_t>
|
|||
bits32f red, green, blue;
|
||||
|
||||
//If saturation is 0, the color is a shade of gray
|
||||
if( abs( get_color( src, saturation_t() )) < 0.0001f )
|
||||
if( std::abs( get_color( src, saturation_t() )) < 0.0001f )
|
||||
{
|
||||
// If saturation is 0, the color is a shade of gray
|
||||
red = get_color( src, value_t() );
|
||||
|
|
Loading…
Reference in a new issue