SkrillexX Posted March 9, 2014 Share Posted March 9, 2014 Anyone could tell me what's the purpose from using math.random ? is it to choose any random number ? Link to comment
Karuzo Posted March 9, 2014 Share Posted March 9, 2014 Yes, but not only for numbers. You could use variables too. Link to comment
SkrillexX Posted March 9, 2014 Author Share Posted March 9, 2014 What about the syntax or the appropriate use of math.random ? Link to comment
Karuzo Posted March 9, 2014 Share Posted March 9, 2014 For example , you want to give a random number between lets say 100 and 500 Than you just use math.random(100,500) Link to comment
SkrillexX Posted March 9, 2014 Author Share Posted March 9, 2014 Got it , thanks a lot Link to comment
ixjf Posted March 9, 2014 Share Posted March 9, 2014 math.random generates a pseudo-random number based on a seed, which just in case you can change by calling math.randomseed, in a specified range. There's no single use for it. Link to comment
Saml1er Posted March 9, 2014 Share Posted March 9, 2014 math.random generates a pseudo-random number based on a seed, which just in case you can change by calling math.randomseed, in a specified range. There's no single use for it. Yep. It also works for functions, tables etc. Link to comment
Hell-Mate Posted March 10, 2014 Share Posted March 10, 2014 You can use math.random from picking up any number, variables, tables or any random thing and here is usage > math.random ( randomFrom, randomTo ) it will pick up any variable, number, table from what u wrote. Link to comment
Karuzo Posted March 10, 2014 Share Posted March 10, 2014 You can use math.random from picking up any number, variables, tables or any random thing and here is usage > math.random ( randomFrom, randomTo ) it will pick up any variable, number, table from what u wrote. Got it , thanks a lot Why were you replying than Fady-Jo ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now