I want to randomize a float that so that
- There is 95% chance to be about 1
- There is 0.01% chance to be < 0.1 or > 1.9
- It never becomes 0 or 2
Is this possible by using Random.nextFloat()
several times for example?
A visual illustration of the probability: