5 ms·
Interesting, I'll test this. Thanks! Btw, what is the advantage of this over dividing? Is it faster, does it give better distribution?
by ZoFreX 12y ago
Interesting, I'll test this. Thanks!
Btw, what is the advantage of this over dividing? Is it faster, does it give better distribution?
- lmm 12y agoIt should be faster than dividing. It will give you a uniform distribution over some (but not all) of the representable values between 0.0 and 1.0 (there are as many representable values between e.g. 0.25 and 0.5 as there are between 0.5 and 1.0, so a uniform distribution over representable values probably isn't what you want), which is probably as good as you can do.