Page 4 of 4

Re: RandomLua Library

Posted: Wed Sep 11, 2013 5:39 pm
by Boolsheet
I should note that the function I pasted has a period of 65536 because the internal state is clamped to 16 bits. I guess you could increase that by throwing more stuff like the mul16 function at it, but this already involves quite a lot of calculations and it would get rather slow. The function works best if you pass seeds below 65536 as higher numbers just get clamped to 16-bits anyway.

I don't quite get what srandom is supposed to do and how it fits into your scripts.

Re: RandomLua Library

Posted: Thu Sep 12, 2013 1:04 am
by posfan12
OK, thanks. I got it working.