diff --git a/Cargo.toml b/Cargo.toml index 5d7b723674be74bde31187b40004203582dcea5a..2ca9ee396e3be226371e8b3c0c67ae2f6c664961 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dotacat" -version = "0.1.2" +version = "0.1.3" authors = ["Stephen <stephen@scd31.com>"] description = "Like lolcat, but fast" edition = "2018" diff --git a/src/lol.rs b/src/lol.rs index 32a5968fc1a49c896ed1c1b8d29d7261709cd457..3dab9218fb9fa3dcb08024f9f85104b8595c5c64 100644 --- a/src/lol.rs +++ b/src/lol.rs @@ -4,7 +4,7 @@ use std::io::{stdout, Write}; use std::process::exit; fn rainbow(freq: f64, i: f64) -> (u8, u8, u8) { - let red = ((freq * i).sin() * 127.0) as u8 + 128; + let red = ((freq * i).sin() * 127.0) as i16 + 128; let green = ((freq * i + 2.0 * consts::PI / 3.0).sin() * 127.0) as i16 + 128; let blue = ((freq * i + 4.0 * consts::PI / 3.0).sin() * 127.0) as i16 + 128; (red as u8, green as u8, blue as u8)