summaryrefslogtreecommitdiffhomepage
path: root/examples/list.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-09-13 11:43:18 +0200
committerTyge Løvset <[email protected]>2020-09-13 11:43:18 +0200
commitb3a1581b7dabd0fe8989f605bdcf1fee93f657d9 (patch)
treec006823101255063ff597fbc9e3dc5a0ee0ad7cf /examples/list.c
parent53b89639a8d00af879389b55edb29276dd31e0db (diff)
downloadSTC-modified-b3a1581b7dabd0fe8989f605bdcf1fee93f657d9.tar.gz
STC-modified-b3a1581b7dabd0fe8989f605bdcf1fee93f657d9.zip
reverted back to separate random engine and distribution parameters.
Diffstat (limited to 'examples/list.c')
-rw-r--r--examples/list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/list.c b/examples/list.c
index 24dfc82f..dd8bba2f 100644
--- a/examples/list.c
+++ b/examples/list.c
@@ -8,10 +8,10 @@ int main() {
int k, n = 100000;
clist_fx list = clist_ini;
crand_rng64_t eng = crand_rng64_init(time(NULL));
- crand_uniform_f64_t dist = crand_uniform_f64_init(eng, 0.0f, n);
+ crand_uniform_f64_t dist = crand_uniform_f64_init(0.0f, n);
for (int i = 0; i < 100000; ++i)
- clist_fx_push_back(&list, crand_uniform_f64(&dist));
+ clist_fx_push_back(&list, crand_uniform_f64(&eng, &dist));
k = 0; c_foreach (i, clist_fx, list)
if (++k <= 10) printf("%8d: %10f\n", k, i.item->value); else break;