I think you are right :) So forget the method I suggest and long live to modulo :p
On 9/24/06, Olivier Delannoy <olivier.delannoy@xxxxxxxxx> wrote:
> If anyone has a better explanation (which is not going to be really > hard) or a better way to highlight the benefits of one method over the > other, I would be really pleased to read of it here. >
From reading the man page it appears that in older implementations the lower order bits are not as random as the higher order bits and so the problem with modulus method is that it uses the (less random) lower-order bits.
However, the man page also says that in the modern implementation this has been fixed, so I presume that the modulus method would now be just be just as effective (and simpler), which may be why your experiment did not show a difference.
Chris
-- E-Mail: Chris Nystrom <cnystrom@xxxxxxxxx> http://www.newio.org/ AIM: nystromchris
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html