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 /misc/examples/gauss2.c | |
| 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 'misc/examples/gauss2.c')
| -rw-r--r-- | misc/examples/gauss2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/gauss2.c b/misc/examples/gauss2.c index 96ab9d6d..c531e5e3 100644 --- a/misc/examples/gauss2.c +++ b/misc/examples/gauss2.c @@ -22,16 +22,16 @@ int main() stc64_normalf_t dist = stc64_normalf_new(Mean, StdDev); // Create and init histogram map with defered destruct - c_AUTO (csmap_int, mhist) + c_auto (csmap_int, mhist) { - c_FORRANGE (N) { + c_forrange (N) { int index = (int) round( stc64_normalf(&rng, &dist) ); csmap_int_insert(&mhist, index, 0).ref->second += 1; } // Print the gaussian bar chart - c_AUTO (cstr, bar) - c_FORPAIR (index, count, csmap_int, mhist) { + c_auto (cstr, bar) + c_forpair (index, count, csmap_int, mhist) { int n = (int)((float)*_.count * StdDev * Scale * 2.5f / (float)N); if (n > 0) { cstr_resize(&bar, n, '*'); |
