Herbert Voss <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
>
>> Herbert Voss <[EMAIL PROTECTED]> writes:
>> | Angus Leeming wrote:
>>
>>>>    r = int(factor * double(r));
>>>>    g = int(factor * double(g));
>>>>    b = int(factor * double(b));
>>>>
>>>
>> | never divide or multiply with powers of 2!
>> Hmm why?
>
>
| shift left or right

Only use shift when that is what you mean logically, and use multiply
or divide when that is what you mean.

int const pi = 4;
itn const pi_2 = pi / 2;  // not pi >> 1

-- 
        Lgb

Reply via email to