0

RANDOM RANGE [INTEGER] generator never generates the max value

Chrome Juice 5 months ago updated 5 months ago 2

The RANDOM RANGE [INTEGER] generator will randomly select the  interger values between the min and Max, including the MIN set value. However, it will never select the max value.

In this example, it will generate values between 0 and 10.  But 11 will never be generated


Bolt Version:
1.4
Unity Version:
2019.3.9f1
Platform(s):
PC
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET Standard 2.0

This is working correctly. It returns the value between min inclusive and max exclusive,so if you want to return 11 then max should be 12.

Ok, Thanks.  I do see the max[exclusive] description, now, and have a better understanding of its meaning.