This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
kalnat's profile picture

math.random, max and min?

Started by kalnat, 09 March 2014 - 10:47 AM
kalnat #1
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
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.