[NXC] Check if pixel is on/off?
Re: [NXC] Check if pixel is on/off?
Pointless?? Maybe so. I just need to squeeze all the speed out of it.
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
-
- Posts: 358
- Joined: 01 Oct 2010, 06:37
- Location: Denmark
- Contact:
Re: [NXC] Check if pixel is on/off?
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.nxtboyiii wrote:Pointless?? Maybe so. I just need to squeeze all the speed out of it.
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.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
Who is online
Users browsing this forum: Semrush [Bot] and 2 guests