aboutsummaryrefslogtreecommitdiffstats
path: root/src/point.rs
diff options
context:
space:
mode:
authorbrian cully <bjc@spork.org>2025-12-29 20:44:00 -0500
committerbrian cully <bjc@spork.org>2025-12-29 20:44:00 -0500
commitb2fe275aa4486cfcb54e8149878402f64b0c84dd (patch)
tree0b06dc86ea049377f9b06bc252ae393f7414dae5 /src/point.rs
parent4c3b55529838e8c9d42f9ebb43c95f5020f22b21 (diff)
downloadpolyring-b2fe275aa4486cfcb54e8149878402f64b0c84dd.tar.gz
polyring-b2fe275aa4486cfcb54e8149878402f64b0c84dd.zip
wasm: string interpolation
Diffstat (limited to 'src/point.rs')
-rw-r--r--src/point.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/point.rs b/src/point.rs
index 18d3d5f..34cdb69 100644
--- a/src/point.rs
+++ b/src/point.rs
@@ -3,12 +3,12 @@ use crate::state::{MAX_SPEED, TAU};
const POINT_RADIUS: f64 = 0.01;
fn rand_color() -> String {
- format!(
- "rgb({} {} {})",
+ let [r, g, b] = [
fastrand::u8(0..255),
fastrand::u8(0..255),
- fastrand::u8(0..255)
- )
+ fastrand::u8(0..255),
+ ];
+ format!("rgb({r} {g} {b})",)
}
#[derive(Clone, Debug)]