What does this line of code mean?
Posted
by Victor
on Stack Overflow
See other posts from Stack Overflow
or by Victor
Published on 2009-10-14T17:57:08Z
Indexed on
2010/05/06
11:28 UTC
Read the original article
Hit count: 204
c
Hi, I am wondering what this line of code mean?
b = (gen_rand_uniform()>0.5)?1:0;
The gren_rand_uniform()
is a function to generate random 0 and 1 numbers. However I don't get the meaning for >0.5
and 1:0
.
I know this is supposed to be a basic question, please bear with me.
Thanks!
© Stack Overflow or respective owner