Opengl Texture snipet

c = ((((i&0x8)==0)^((j&0x8))==0))*255;

how is this line is explained??
If the 4th bit of "i" is 0 or the 4th bit of "j" is 0, but not both, c = 255. Otherwise c = 0.
c is 255 when one and only one of the following is true:
* Bit 3 in i is zero (bit 0 being the least significant one).
* Bit 3 in j is zero.
In other cases, c is zero.

It's intricate, but probably the best way to do it.
Topic archived. No new replies allowed.