On 2015-11-25, Michael McConville <mm...@mykolab.com> wrote: >> - t = random() >> 5; > > * what was the point of the shift-right-by-five in the original code?
Those games were originally written with the rand(3) function. The lower bits returned by rand(3) suffered from notoriously poor randomness, so this idiom developed where people would use the higher, more random bits. At some point, somebody did a bulk search and replace of rand(3) with the better quality random(3) function but didn't think to clean up this idiom. -- Christian "naddy" Weisgerber na...@mips.inka.de