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

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





Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  39,85 ?  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2

Other related posts: