diff options
| author | Tyge Løvset <[email protected]> | 2023-02-08 16:16:49 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-08 17:18:24 +0100 |
| commit | c4441f5fc665194fbd7a894a67a64a08c3beac42 (patch) | |
| tree | 82f231b6e8fcb75625166f98aa785baaa265a3d6 /docs/crandom_api.md | |
| parent | 673dd5319a488d4b702b94dd9aeda4e497ae4fbc (diff) | |
| download | STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.tar.gz STC-modified-c4441f5fc665194fbd7a894a67a64a08c3beac42.zip | |
Changed to use lowercase flow-control macros in examples (uppercase will still be supported). Improved many examples to use c_make() to init containers.
Diffstat (limited to 'docs/crandom_api.md')
| -rw-r--r-- | docs/crandom_api.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/crandom_api.md b/docs/crandom_api.md index 391c485f..e69cc539 100644 --- a/docs/crandom_api.md +++ b/docs/crandom_api.md @@ -94,14 +94,14 @@ int main() // Create histogram map csmap_i mhist = csmap_i_init(); - c_FORRANGE (N) { + c_forrange (N) { int index = (int) round( stc64_normalf(&rng, &dist) ); csmap_i_emplace(&mhist, index, 0).ref->second += 1; } // Print the gaussian bar chart cstr bar = cstr_init(); - c_FOREACH (i, csmap_i, mhist) { + c_foreach (i, csmap_i, mhist) { int n = (int)(i.ref->second * StdDev * Scale * 2.5 / N); if (n > 0) { cstr_resize(&bar, n, '*'); |
