01-20-2010 07:35 AM
01-20-2010 07:49 AM
I just tried the code and get 1-5.
I dont know where the error could be sorry.
01-20-2010 09:09 AM
aeastet wrote:
Funny when I run this code it give me 1-6.
This post makes absolutely no sense unless you tell us which, of all the many versions above, you mean by "this code". 😄
(It certainly cannot be mine, unless you don't copy it right and e.g. confuse "round to -inf" with "round to nearest", for example.).
Why don't you attach the code that does not work so we can have a look. 😉
01-20-2010 09:28 AM
altenbach wrote:
This post makes absolutely no sense unless you tell us which, of all the
many versions above, you mean by "this code". ![]()
(It certainly cannot be mine, unless you don't copy it right and e.g. confuse "round to -inf" with "round to nearest", for example.).
Why don't you attach the code that does not work so we can have a look. ![]()
You are correct I did get the round to mixed up. Sorry.
01-20-2010 09:29 AM - edited 01-20-2010 09:34 AM
01-20-2010 09:30 AM - edited 01-20-2010 09:34 AM
01-21-2010 07:12 AM
I know that this is totally uncalled for, but:
MU-MU-MU-MULTIPOST!!! 😄
01-21-2010 07:15 AM
09-09-2011 03:24 PM
Here is my random 1..5 using Round Toward +Infinity. does not need +1
Another thing i wanted to add to this thread is random gives you a number between 0 and 1. You dont get 0 or 1 back from the random number. you may get .9999 or 0.00001 but not 1 or 0. A previous post said you dont get 1 which is half true.
09-09-2011 04:29 PM
almighty wrote:
Another thing i wanted to add to this thread is random gives you a number between 0 and 1. You dont get 0 or 1 back from the random number. you may get .9999 or 0.00001 but not 1 or 0. A previous post said you dont get 1 which is half true.
Let's be clear here: 0 is possible; very, very unlikely; but possible. 1 is not possible. By your standard you don't get 0.5 (or any specific value you choose like 0).
While I am here, this is my generic random integer generator [Start..Stop].