01-20-2010 12:57 AM
Solved! Go to Solution.
01-20-2010 01:12 AM
check out the conversion palette under "Numeric->conversion"
01-20-2010 01:13 AM - edited 01-20-2010 01:21 AM
For a Random Interger from 1 to 5 you do something like this:
Edit: I just realised, that the chances for every Number are not the same, so my version is kind of unusable for statistically correct purposes.
Its too early in the morning 😉
Edit2: Also I realise further, that my version won't output 1-5 but 0-5 so it is not even what you wanted. D**n what did I do 😄
Cheers
01-20-2010 01:25 AM
01-20-2010 01:38 AM - edited 01-20-2010 01:39 AM
Alana wrote:
What does the I32 do exactly?
"To I32" converts your floating point number to an integer, as you specified in your first post as requirement. 😉
Here' a version that gives all 5 numbers with equal probability. Instead of explicitely converting to I32, I use the output configuration of the +1. Same difference. 😉
01-20-2010 02:23 AM
dear altenbach,
just some "additional" inputs to make it configurable... please kindly comment and advise. Thanks!
01-20-2010 03:53 AM
A similar one here
01-20-2010 06:59 AM
Wouldn't you have to multiply times 4 vs 5. If the random number give you a one then you would get 5 and add 1 to it giving you 6.
01-20-2010 07:01 AM
Wouldn't you have to multiply times 4 vs 5. If the random number give you a one then you would get 5 and add 1 to it giving you 6.
01-20-2010 07:16 AM
No aestet, Altenbachs solution is perfectly fine.
The dice generate a Number between 0 and 1 (Not including 1!!) Multiplied by 5 that is a Number between 0 and 4.999999.
The next triangle always rounds the Number down, so that you can only get 0,1,2,3 and 4 everything with equal propablity.
Plus one you get 1,2,3,4 and 5.