summaryrefslogtreecommitdiffstats
path: root/_log/matrix-digital-rain.md
diff options
context:
space:
mode:
Diffstat (limited to '_log/matrix-digital-rain.md')
-rw-r--r--_log/matrix-digital-rain.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/_log/matrix-digital-rain.md b/_log/matrix-digital-rain.md
index af3cff6..2edc7e7 100644
--- a/_log/matrix-digital-rain.md
+++ b/_log/matrix-digital-rain.md
@@ -7,7 +7,7 @@ thumbnail: thumb_sm.png
---
The 2022 version worked but had some loose ends. Unicode support was
-inflexible--couldn't mix ASCII with Katakana; Phosphor decay was stored in a
+incomplete--couldn't mix ASCII with Katakana; Phosphor decay was stored in a
separate array when it should've been packed with RGB; Code was harder to read
than it needed to be.
@@ -39,10 +39,10 @@ static inline void insert_code(matrix *mat,
uint64_t blk;
uint32_t min, max;
- blk = glyphs[(rand() % glyphlen)];
+ blk = glyphs[(xor() % glyphlen)];
min = (uint32_t)blk;
max = (uint32_t)(blk >> 32);
- mat->code[index(mat, row, col)] = rand() % (max - min) + min;
+ mat->code[index(mat, row, col)] = xor() % (max - min) + min;
}
```
@@ -71,7 +71,7 @@ Optimized RNG--xorshift instead of rand():
```
static inline uint32_t xor(void)
{
- /* Xorshift RNGs, George Marsaglia, The Florida State University. */
+ /* Xorshift RNGs, George Marsaglia, Florida State University. */
static uint32_t y = 2463534242;
y ^= (y << 13);