|
| 22 Feb 2014 11:02 AM |
So with this from the wiki:
for _ = 1, 10 do print(math.random(100)) wait(1) end
How would I make it so it prints number between 0 and .3 |
|
|
| Report Abuse |
|
|
|
| 22 Feb 2014 11:03 AM |
| print(math.random(30)/100) |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Feb 2014 11:08 AM |
| Ok, Thats for 0 to .3? Thanks |
|
|
| Report Abuse |
|
|
|
| 22 Feb 2014 11:11 AM |
Yep,that from 0.0 to 0.3 If u wanted from 0 to 3 print(math.random(30)/10) output would be all like: -2.5 -1.3 -0.6 |
|
|
| Report Abuse |
|
|
gamehero
|
  |
| Joined: 12 Jun 2007 |
| Total Posts: 1455 |
|
|
| 22 Feb 2014 11:18 AM |
I personally like doing this to print randomized decimals.
print(math.random())
Or this...
print(math.random()*0.3)
But it prints numbers like this: 0.123182375 0.294211344 0.011231231
If that's not what you want, then yeah... Just use the first one. |
|
|
| Report Abuse |
|
|
|
| 22 Feb 2014 11:20 AM |
Oh I see it now. So could you do:
math.random(3)/10 Instead? |
|
|
| Report Abuse |
|
|