From Help
Code: Select all
Parameters
seed
A Double seed value for the random number generator. If omitted, a value based on Timer will be used instead.
That should not have been written in the first place.
Anyone reading that would expect the fractional part of a double seed would be honoured. That is not true as shown by the opening post. The only generator keeping the fractional part is generator #4.
Code: Select all
Note: using the Timer value directly as a parameter will produce the same seed if used more than once in the same second.
The reason for that, of course, is because the fractional part is clipped with all generators excepting generator #4. The reason is not given.
Code: Select all
However, it is generally not worth calling Randomize twice with unpredictable seeds anyway, because the second sequence will be no more random than the first.
That is not the reason why Randomize should not be called twice. It should not be called twice because it is possible to enter the sequence just before a section which has already been used. So, it is not just a waste of time, it may have damaging consequences.
So multiple calls to Randomize are not recommended in general. That is pointless as it has already been said.
- After the Randomize call copies the user seed argument (passed by value) into a local Double variable, the result is then casted to Ulong before use. So the fraction-part of the Double is ignored in Randomize.
Again: "So what?" A user needs to know what is happening, as per the opening post, and not what is causing it to happen.
I am sorry guys but what is being proposed is not good enough and is now in the Wiki.
adeyblue wrote:This documentation is for 'how to use', 'how it works' is FB developer information.
Spot on!