RNG used by math.random in 0.9

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Hexenhammer
Party member
Posts: 175
Joined: Sun Feb 17, 2013 8:19 am

RNG used by math.random in 0.9

Post by Hexenhammer » Wed Dec 18, 2013 3:43 am

Which RNG is used if I just call math.random. Given that LÖVE is now LuaJIT by default does that mean that math.random links to LuaJIT's RNG or has it been linked to the new LÖVE RNG?

User avatar
slime
Solid Snayke
Posts: 2887
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: RNG used by math.random in 0.9

Post by slime » Wed Dec 18, 2013 3:54 am

LÖVE doesn't modify the Lua standard library functions (aside from adding loaders to the package.loaders table for require), so if LuaJIT is being used then math.random will be LuaJIT's version as well.

User avatar
Hexenhammer
Party member
Posts: 175
Joined: Sun Feb 17, 2013 8:19 am

Re: RNG used by math.random in 0.9

Post by Hexenhammer » Wed Dec 18, 2013 4:05 am

slime wrote:LÖVE doesn't modify the Lua standard library functions (aside from adding loaders to the package.loaders table for require), so if LuaJIT is being used then math.random will be LuaJIT's version as well.
Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests