I thought always that the random function is 0 indexed, isn't it?
The lower bound is inclusive, but the upper bound is exclusive. If you want to be able to generate a 3, the upper bound needs to be 4.
I thought always that the random function is 0 indexed, isn't it?
The lower bound is inclusive, but the upper bound is exclusive. If you want to be able to generate a 3, the upper bound needs to be 4.