Closed AtzepengPK closed 4 years ago
@AtzepengPK what's wrong with that, please? Or what's not clear?
Maybe this will explain the mystery to @AtzepengPK. Each time you call rng.quick()
you get the next value. The first two values of the hello
and hello1
sequence happen to be bigger then less than 0.5, and less than and bigger than 0.5, respectively.
Running in node:
> sr = require('./seedrandom')
[Function: seedrandom]
> q = sr('hello')
{ [Function: prng] int32: [Function], quick: [Function], double: [Circular] }
> q.quick()
0.5463663768023252
> q.quick()
0.0504581592977047
> q = sr('hello1')
{ [Function: prng] int32: [Function], quick: [Function], double: [Circular] }
> q.quick()
0.4120498853735626
> q.quick()
0.6297062321100384
Idk if it really is an issue but i dont understand this behavior:
results in :
same behavior with rng(). anyone can explain this to me? using v 3.0.5
Thanks