Fix color4d distance return type

This commit is contained in:
Marek Roszko 2022-02-06 21:05:44 -05:00
parent 79c7d55a40
commit 1f8d101b1d
2 changed files with 2 additions and 2 deletions

View File

@ -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 )

View File

@ -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.