hatrick Posted November 24, 2013 Share Posted November 24, 2013 Hi, how i can randomly choose between defined values. example rand choose between (0,1,2,3) = floor(fit01(rand($PT), 0, 3)) goal rand choose between (0,15,30,45) thank you Quote Link to comment Share on other sites More sharing options...
graham Posted November 24, 2013 Share Posted November 24, 2013 You could use the arg() function in combination with your floor() function above, which acts basically as the index selector: arg("0 15 30 45", floor(fit01(rand($PT), 0, 3))) Your values of 0-3 will then map to the corresponding elements you want to choose from. Quote Link to comment Share on other sites More sharing options...
hatrick Posted November 24, 2013 Author Share Posted November 24, 2013 great! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.