This is a read-only snapshot of
the ComputerCraft forums
, taken in April 2020.
ComputerCraft
→
Ask a Pro
math.random, max and min?
Started by kalnat, 09 March 2014 - 10:47 AM
kalnat
#1
18 posts
Posted 09 March 2014 - 11:47 AM
I havent used CC/lua in a while and I need help,
is math.random(1, 2) correct for random picking 1-2 numbers or is it (0, 2)…
mrpoopy345
#2
147 posts
Location
My Computer
Posted 09 March 2014 - 11:55 AM
Math.random(1, 2) Will pick either 1 or 2, while math.random(0, 2) will produce either 0, 1 or 2.
Hope that helps.