- changed milestone to 3.0.2
Math.Random behavior still unexpected
Issue #33
resolved
Math.Random still does not behave as one would expect it to be. I thought I already reported this a long time ago, but it is still present and I didn't see a bugreport, so here it is:
Math.Random does not return a number between "parameter 1" and "parameter 2", but returns a number beween "parameter 1" + "parameter 2":
for i=0, 20 do
local rnd = Math.Random(10, 20)
say "rnd $i", "$rnd";
end
Outputs a number beween 10 and 29 (both inclusive).
Comments (3)
-
-
-
- changed status to resolved
Fix derps in Math.Random. Fixes
#33→ <<cset e6e23528f2d3>>
- Log in to comment
Please leave the milestone empty, since it describes the version where an issue will be fixed in.