ralph333 wrote:
There is a bug in setWheelTotalSpins when wheelTotalSpinsRandom is true. You are more likely to get wheelTotalSpinsMin then any other value (unless min is 1). The chance of that happening goes up with larger values of wheelTotalSpinsMin.
Using the default min/max values of 2 & 6, you should get one of 2 3 4 5 6 depending on the random() result. But as is, you get one of : 2 2 3 4 5 6. If the min/max are 4 & 6, you get: 4 4 4 4 5 6
To fix, replace
wheelTotalSpins = getRandom(wheelTotalSpinsMax)+1 // gives 1..max
if(wheelTotalSpins<wheelTotalSpinsMin)
wheelTotalSpins = wheelTotalSpinsMin // maps all values < min to min
with
wheelTotalSpins = getRandom(wheelTotalSpinsMax - wheelTotalSpinsMin + 1) + wheelTotalSpinsMin
Thanks for spotting that and highlighting the fix. I will update tomorrow with this fixed!