Yes, indeed. If you’re randomly generating colours and you want to evenly cover the {0,1,…,255} integer space, then generate a random integer in that range directly, or truncate a random float in [0,256). Generating a random float in [0,1) and converting it afterwards, then complaining you’re not getting enough 0 or 255 is silly.
The random number generation is not the source of the complaint. That is just made to easily prove the point in the article.
The argument is not to use another method when randomly sampling from [0,1). The argument is that f32 color channels are already in the [0,1) range, and following the alternate method results in a “fair-er” representation of the range.
The plot that was generated with the random sampling is just to show that the standard method is not “fair”.
Yes, indeed. If you’re randomly generating colours and you want to evenly cover the {0,1,…,255} integer space, then generate a random integer in that range directly, or truncate a random float in [0,256). Generating a random float in [0,1) and converting it afterwards, then complaining you’re not getting enough 0 or 255 is silly.
The random number generation is not the source of the complaint. That is just made to easily prove the point in the article.
The argument is not to use another method when randomly sampling from
[0,1). The argument is that f32 color channels are already in the[0,1)range, and following the alternate method results in a “fair-er” representation of the range.The plot that was generated with the random sampling is just to show that the standard method is not “fair”.