inline int DistanceSquared(Color c) const;
DistanceSquared calculates the distance between the local color and the passed color, using the traditional 'Euclidean' formula: (r1 - r2)^2 + (g1 - g2)^2 + (b1 - b2)^2 where r1, g1, b1 are the RGB components of the current color (this), and r2, g2, b2 are the RGB components of the passed color (c).
Parameters |
Description |
Color c |
A color used to determine the distance from the current color. |
An int value containing the distance squared between the current and passed colors.