Mail Archives: djgpp/1996/08/02/19:59:04
Reply to message 0139193 from SENGAN.SHORT@ on 08/02/96 6:18AM
>> putpixel (loop1, loop2, rand() % 0xff );
>
>Did you not mean % 0x100 ?
>
>Can't you even correct things properly ! (joke ;-) )
Oops.
I guess even my vaunted proofreader's mind can make a booboo once
in a while. :) Actually, what happened was that I confused masking the
bits with & and taking the mod with %. So the line would have been
correct if I'd written:
putpixel (loop1, loop2, rand() & 0xff );
or
putpixel (loop1, loop2, rand() % 0x100 );
Sorry for the mistake. :P
John
- Raw text -