Color::Subtract

Color::Subtract
static inline Color Subtract(Color c1, Color c2);
inline Color& Subtract(Color c);
Description

Subtract combines two colors by taking the clamped difference of each channel (c1 - c2). For Color objects, the actual equation used for each 8 bit channel is: max(c1-c2, 0).

Parameters
Parameters 
Description 
Color c1 
The first (the destination) of two color parameters that is combined to form a new color (return value). * 
Color c2 
The second (the source) of two color parameters that is combined to form a new color (return value). * 
Color c 
A color (the source) subtracted from the current color (the destination). 
Return Value

The member function, taking one parameter (c), returns a Color reference to the current string, which was formed by subtracting the passed color from the original color (this - c). 

The static function, taking two parameters (c1 and c2), returns a new Color by value, which is formed from the difference of the two passed colors (c1 - c2). * 

* - pertains to static function only. 

See Also