diff options
author | jaseg <git@jaseg.net> | 2020-12-25 15:38:30 +0100 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2020-12-25 15:38:30 +0100 |
commit | e6103e70bea8e228a6318c1c67f89e406be7c409 (patch) | |
tree | 7ae9cfbcf0bb60cc62389235f4606430c31650a2 | |
parent | a924f2a5238bc0a124739c48d9d6408862de7164 (diff) | |
download | lolcat-e6103e70bea8e228a6318c1c67f89e406be7c409.tar.gz lolcat-e6103e70bea8e228a6318c1c67f89e406be7c409.tar.bz2 lolcat-e6103e70bea8e228a6318c1c67f89e406be7c409.zip |
Add random support for rgb mode
-rwxr-xr-x | lolcat.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -196,7 +196,7 @@ int main(int argc, char** argv) } else { if (rgb) { i += wcwidth(c); - float theta = i * freq_h / 5.0f + l * freq_v + offx * M_PI; + float theta = i * freq_h / 5.0f + l * freq_v + (offx + 2.0f * rand_offset / RAND_MAX) * M_PI; float offset = 0.1; uint8_t red = lrintf((offset + (1.0f - offset) * (0.5f + 0.5f * sin(theta + 0 ))) * 255.0f); |