diff options
| author | Tyge Lovset <[email protected]> | 2023-02-01 08:38:45 +0100 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-02-01 08:38:45 +0100 |
| commit | 6ce6ef3307e52db5813d3c8d6a2cba52df06daf8 (patch) | |
| tree | 25af4be9fcd5e72778715b83ff312e157ca63b59 /docs/crandom_api.md | |
| parent | b677a0c3950b8294ba6458e682a885351273ac08 (diff) | |
| download | STC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.tar.gz STC-modified-6ce6ef3307e52db5813d3c8d6a2cba52df06daf8.zip | |
Massive update from unsigned sizes and indices to signed.
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 bd3bf848..7dced0eb 100644 --- a/docs/crandom_api.md +++ b/docs/crandom_api.md @@ -76,7 +76,7 @@ double stc64_normalf(stc64_t* rng, stc64_normalf_t* dist); // Declare int -> int sorted map. Uses typetag 'i' for ints. #define i_key int -#define i_val size_t +#define i_val intptr_t #define i_tag i #include <stc/csmap.h> @@ -102,7 +102,7 @@ int main() // Print the gaussian bar chart cstr bar = cstr_init(); c_FOREACH (i, csmap_i, mhist) { - size_t n = (size_t) (i.ref->second * StdDev * Scale * 2.5 / N); + int n = (int)(i.ref->second * StdDev * Scale * 2.5 / N); if (n > 0) { cstr_resize(&bar, n, '*'); printf("%4d %s\n", i.ref->first, cstr_str(&bar)); |
