diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index e4ed67d749..09b04f8929 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -510,7 +510,7 @@ const COLOR4D COLOR4D::BLACK( 0, 0, 0, 1 ); const COLOR4D COLOR4D::CLEAR( 1, 0, 1, 0 ); -int COLOR4D::Distance( const COLOR4D& other ) const +double COLOR4D::Distance( const COLOR4D& other ) const { return ( r - other.r ) * ( r - other.r ) + ( g - other.g ) * ( g - other.g ) diff --git a/include/gal/color4d.h b/include/gal/color4d.h index 7d91ad77a4..7baf4813b9 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -373,7 +373,7 @@ public: /** * Returns the distance (in RGB space) between two colors. */ - int Distance( const COLOR4D& other ) const; + double Distance( const COLOR4D& other ) const; /** * Returns a legacy color ID that is closest to the given 8-bit RGB values.