✓ Accepted answer
math.random(a,b) only returns integers between a and b.
This is usually desirable, so that, for example, picking a random element from a list is possible:
math.random(1,#tab).
Perhaps you say -- "But the paramaters aren't integers! It should know that's not what I want!" However, that would result in inconsistency - multiply the range by ten and suddenly it no longer densely fills the space.
math.random() (no parameters) generates uniform numbers in the interval [0, 1).
Use it to generate arbitrary numbers:
local s = 6.4 + (9.6 - 6.4) * math.random()
1 comment
Thank you guys and mostly BlueTaslem, as always. (: