why the array bounds array

BCS ao at pathlink.com
Sun Dec 7 22:59:40 PST 2008


Reply to Bill,

> On Mon, Dec 8, 2008 at 2:57 PM, BCS <ao at pathlink.com> wrote:
> 
>> Reply to Michael P.,
>> 
>> rand() & TYPES_OF_TILES
>> 
>> never use rand like that (the low order bit on many rands toggles
>> every
>> single time)
>> better (I think):
>> rand() / (TYPES_OF_TILES / RAND_MAX)
>> 
> That's a divide by zero, so I don't think that's what you meant.
> 
> --bb
> 

Oops  x-p

rand() / (RAND_MAX / TYPES_OF_TILES)




More information about the Digitalmars-d-learn mailing list