s
This commit is contained in:
parent
5c4803526a
commit
7dacd45610
2 changed files with 7 additions and 4 deletions
|
@ -139,15 +139,15 @@ impl Pattern for Random {
|
|||
let max = self.max;
|
||||
if self.r {
|
||||
let y: f64 = rng.gen();
|
||||
color[2] = ((y * (max - min) as f64) as u8 + min);
|
||||
color[2] = (y * (max - min) as f64) as u8 + min;
|
||||
}
|
||||
if self.g {
|
||||
let y: f64 = rng.gen();
|
||||
color[1] = ((y * (max - min) as f64) as u8 + min);
|
||||
color[1] = (y * (max - min) as f64) as u8 + min;
|
||||
}
|
||||
if self.b {
|
||||
let y: f64 = rng.gen();
|
||||
color[0] = ((y * (max - min) as f64) as u8 + min);
|
||||
color[0] = (y * (max - min) as f64) as u8 + min;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,10 @@ pub fn websocket(pattern: &Arc<Mutex<Vec<Box<dyn Pattern>>>>) {
|
|||
}
|
||||
else {
|
||||
let msg = tungstenite::Message::from("Not text");
|
||||
websocket.write_message(msg);
|
||||
match websocket.write_message(msg) {
|
||||
// fuck this result in particular
|
||||
_ => {}
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue