I have to recommend moving away from using modulo to get random numbers in range - it hurts distribution. The exact "trick" escapes at the moment but it's better to start with math rand (0.0 - 1.0) and go up from there.
Blech.
Using modulo is no worse for distribution than any other [linear] approach. Scaling 0.0 - 1.0 up to the desired range is no better.
The end result of either approach is you're taking X possible outputs and scaling them down to Y outputs. Any way you slice it, there's a direct approach to where 1 random number gets converted to 1 output number. So unless Y is a perfect multiple of X, there will always be distribution issues no matter which approach you use.
The only way to solve distribution problems (that I know of) would be to "reroll" on certain outcomes. Like if you can get ideal distribution with [0..8) and you want [0..6), then have outputs of 6 and 7 be "rerolled" until you get [0..6)
EDIT: but of course even that can have adverse effects on distribution if you're using the same RNG sequence for multiple things.
EDIT 2:
Actually, the approach where you scale up from [0..1) approach would be
worse for distribution than using modulo if you're using floats, because it makes the pool size (X) smaller.
Though I suppose if you use doubles instead of floats it works out to the same.