Color::AddCh

Color::AddCh
static inline UByte AddCh(unsigned c1, unsigned c2);
Description

AddCh combines two colors by taking the clamped sum of the two channels (c1 + c2). For 8 bit channels, the actual equation used is: min(c1 + c2, 255).

Parameters
Parameters 
Description 
unsigned c1 
The first (the destination) of two channels that are summed to form the new value (return value). 
unsigned c2 
The second (the source) of two channels that are summed to form the new value (return value). 
Return Value

A UByte value formed from the summation of the two channels (c1 + c2).

See Also