randInt
and randInt3
both give a value in the range "min to (max+min)". randInt3
is slightly better.
randInt2
gives a value in the range "min to max"
randFloat
gives a value in the range "min to max" as a float.
randFloat2
is wrong and will always give a value in the range "min to (some really small number just above min".
The expression arc4random()/UINT32_MAX
in randFloat
gives a value in the range 0.0 to 1.0.