Fix color4d distance return type
(cherry picked from commit 1f8d101b1d
)
This commit is contained in:
parent
8fc831cbc2
commit
e72bd34383
|
@ -510,7 +510,7 @@ const COLOR4D COLOR4D::BLACK( 0, 0, 0, 1 );
|
||||||
const COLOR4D COLOR4D::CLEAR( 1, 0, 1, 0 );
|
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 )
|
return ( r - other.r ) * ( r - other.r )
|
||||||
+ ( g - other.g ) * ( g - other.g )
|
+ ( g - other.g ) * ( g - other.g )
|
||||||
|
|
|
@ -373,7 +373,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Returns the distance (in RGB space) between two colors.
|
* 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.
|
* Returns a legacy color ID that is closest to the given 8-bit RGB values.
|
||||||
|
|
Loading…
Reference in New Issue