MightyPirates/OpenComputers — pull request #399 by gamax92 (2014-07-13 18:28:35+00:00)
Title: Fix math.random

Why I feel this is now correct:
Lua simply grabs a number, not of a specific type like int or double. However you can store ints inside a double so checkdouble is used instead.
However there is no nextDouble(double) method, so it has to be simulated via multiplication (what lua does anyway)
The fact that the variables are also double now is no concern, since in lua doing math.random(1,3.1), 4 can also show up.

Also, said problem is present in LuaStateFactory.scala and an issue will be created for it.