Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

+ use std::abs

  • Loading branch information...
commit 0668fe2958a2cbd5400b7f1b19f56157a56630e8 1 parent 465842e
@artemp artemp authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 boost/gil/extension/toolbox/hsv.hpp
View
8 boost/gil/extension/toolbox/hsv.hpp
@@ -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() );
Please sign in to comment.
Something went wrong with that request. Please try again.