Fix color4d distance return type
This commit is contained in:
parent
79c7d55a40
commit
1f8d101b1d
|
@ -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 )
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue