Page 2 of 2

Re: [NXC] Check if pixel is on/off?

Posted: 07 Mar 2012, 03:37
by nxtboyiii
Pointless?? Maybe so. I just need to squeeze all the speed out of it.

Re: [NXC] Check if pixel is on/off?

Posted: 07 Mar 2012, 11:57
by spillerrec
nxtboyiii wrote:Pointless?? Maybe so. I just need to squeeze all the speed out of it.
That is pointless. While the function isn't going to become faster, notice that it is inefficient. It cannot retrieve a single pixel, it has to retrieve a whole bunch of them and trow the others away.
So if you want your code to go faster, try to modify your code so that it accesses the pixels in a way so that you can integrate isPixelSet() into your function and reduce the amount of pixels wasted.