[Tex/LaTex] Tikz – What is the interval in which the value of `rand` lies within

tikz-pgf

I'm trying to put two object randomly in a shape, the presence of first object is approximately 50% , and also the same for the second object. So this is why i need to use the rand value.

For example I will try to test if the value of rand is greater than 0.5*RAND_MAX then put object one, else put object two.

So the question is: What is the interval in which the value of rand lies within?

Best Answer

Between -1 and 1, distributed uniformly.

See section 89.3.6 Pseudo random functions of the TikZ manual for descriptions of the (pseudo-)random number generators.

Related Question