|
Post by kennn on Jul 6, 2020 20:11:59 GMT -6
Hello, I discovered that RGB(Rand(255), Rand(255), Rand(255)) was used in some examples. However, since Rand(N) returns an integer between 0 and N-1, RGB(Rand(256), Rand(256), Rand(256)) should be more correct!!
|
|
|
Post by n00b on Jul 7, 2020 7:43:24 GMT -6
Which examples was it?
|
|
|
Post by kennn on Jul 7, 2020 21:06:39 GMT -6
|
|
|
Post by johnno56 on Jul 7, 2020 22:05:01 GMT -6
Ah, yes. 'That' game...
The answer is simple... At the time I wrote that (about 3 years ago) I didn't know about the rand 'quirk'. I assumed the range would be from 0 to 255. But, if you think about it, does anyone believe that they could tell the difference in colour between 254 and 255? The difference 'now' is that I now know... The overall fix to the problem is just as simple... Change the documentation... My guess is that RC is not the only basic with this quirk...
|
|
|
Post by kennn on Jul 10, 2020 6:41:37 GMT -6
Ah, yes. 'That' game... The answer is simple... At the time I wrote that (about 3 years ago) I didn't know about the rand 'quirk'. I assumed the range would be from 0 to 255. But, if you think about it, does anyone believe that they could tell the difference in colour between 254 and 255? The difference 'now' is that I now know... The overall fix to the problem is just as simple... Change the documentation... My guess is that RC is not the only basic with this quirk... I see. Thanks for your explanation. Good points.
|
|