File tree 2 files changed +38
-31
lines changed
2 files changed +38
-31
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,37 @@ exports[`random.clone with seedrandom rng is consistent 1`] = `
107
107
108
108
exports [` random.clone with string seed is consistent 1` ] = `
109
109
[
110
+ 1.0605080478180011,
111
+ 0.3824102148617453,
112
+ -0.7366504345478391,
113
+ -0.7946475045739224,
114
+ -1.2247324314330592,
115
+ 0.6716850060654046,
116
+ -1.009299614178395,
117
+ 0.053268550981502426,
118
+ 0.9740577508148593,
119
+ -0.6752585320928494,
120
+ 0.7446218073301792,
121
+ -2.129054359211667,
122
+ -1.8318170942537888,
123
+ 0.12094888734754691,
124
+ -0.10445788111868438,
125
+ -0.08857052877829866,
126
+ -1.2097296776821065,
127
+ -0.117177897638088,
128
+ 0.589262412952502,
129
+ -0.31461503408417685,
130
+ 1.5492120933673714,
131
+ -0.30159579028234024,
132
+ 0.10169022209103494,
133
+ -1.1878904212756178,
134
+ -0.4045334642187247,
135
+ -1.7727229412321357,
136
+ -2.1370757665469235,
137
+ 2.552039624962811,
138
+ 0.116684628880318,
139
+ -0.0738586836791935,
140
+ -0.7462649962349035,
110
141
-0.7308953270140024,
111
142
-1.397496377452742,
112
143
1.080022871482886,
@@ -176,36 +207,5 @@ exports[`random.clone with string seed is consistent 1`] = `
176
207
-0.42212246077683613,
177
208
0.4452340452580614,
178
209
0.5214098824451193,
179
- 0.5261731542250729,
180
- -1.9760762141173631,
181
- -0.02366443885152299,
182
- 2.2045706549604085,
183
- -0.9539523110709375,
184
- 1.4506343286311132,
185
- 0.3467276605267618,
186
- -0.3126486856331966,
187
- 0.3976234946199155,
188
- 0.03972873764115353,
189
- -1.065135894710488,
190
- -1.774696580571943,
191
- -0.21789527191022195,
192
- -0.40131086017803463,
193
- 1.1505442166993554,
194
- -0.12989443662862746,
195
- -0.5339995460989937,
196
- -1.3689553822596103,
197
- 0.3658151914606086,
198
- -0.31427810970979253,
199
- 0.09341633767524923,
200
- -0.42638571686137094,
201
- -0.4746635808010573,
202
- 0.6136865921177203,
203
- 0.013465964925832692,
204
- 2.0006709113661008,
205
- -1.1190668236020196,
206
- 0.37543611825618245,
207
- 0.4693145026760069,
208
- -0.19901649066247049,
209
- -0.067766300521877,
210
210
]
211
211
` ;
Original file line number Diff line number Diff line change @@ -71,6 +71,13 @@ test('random.uniform() with seedrandom has mean 0.5', () => {
71
71
assert . closeTo ( mean , 0.5 , 0.05 )
72
72
} )
73
73
74
+ test ( 'random.uniform() with seed has mean 0.5' , ( ) => {
75
+ const r = random . clone ( 'OTU2YTM0NjQ5MjM1ZTA3MTg4YjQyYjUw' )
76
+ const d = r . uniform ( )
77
+ const mean = calcMean ( d )
78
+ assert . closeTo ( mean , 0.5 , 0.05 )
79
+ } )
80
+
74
81
test ( 'random.uniform() with XOR128RNG has mean 0.5' , ( ) => {
75
82
const r = random . clone ( new XOR128RNG ( 3 ) )
76
83
const d = r . uniform ( )
You can’t perform that action at this time.
0 commit comments