[haiku-development] Re: [Haiku-commits] r21411 - in haiku/trunk/src/tests/kits/game: . ParticlesII

2007/6/14, Marcus Overhagen <marcusoverhagen@xxxxxxxx>:
jackburton at BerliOS wrote:

> +             particle_list[i].timeval = random() & 64;
This gives you just a single bit. Is this wanted?

> +     if((xCoord > 0) && (yCoord > 0) && (xCoord < width) && (yCoord < 
height))
> +             set_pixel(xCoord,yCoord,color);
Checks like this one can possibly be speed up by casting the variables to 
unsigned:

        if (unsigned(xCoord) < width && unsigned(yCoord) < height)

Finally, please look into the 
http://haiku-os.org/documents/dev/haiku_coding_guidelines

have fun

Marcus


Thank you Marcus, but I know the haiku coding guidelines well enough.
I simply didn't write this code and currently I didn't feel like
cleaning it up all to follow our guidelines.

Other related posts: