mherkender / lua.js

An ECMAscript framework to compile and run Lua code, allowing Lua to run in a browser or in Flash
http://blog.brokenfunction.com/
600 stars 73 forks source link

Fix math.random() to handle floats properly #29

Closed elisee closed 11 years ago

elisee commented 11 years ago

Floats should be turned to integers in math.random().

For instance: math.random(0, 0.5) should always return 0.

mherkender commented 11 years ago

Nice catch.