RandomLua Library

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: RandomLua Library

Post 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.
Shallow indentations.
posfan12
Prole
Posts: 5
Joined: Mon Sep 09, 2013 9:26 pm

Re: RandomLua Library

Post by posfan12 »

OK, thanks. I got it working.
Post Reply

Who is online

Users browsing this forum: No registered users and 83 guests