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.
RandomLua Library
Re: RandomLua Library
Shallow indentations.
Re: RandomLua Library
OK, thanks. I got it working.
Who is online
Users browsing this forum: Google [Bot] and 8 guests