diff --git a/examples/simple_client.rs b/examples/simple_client.rs index 9cb8eff..fab3c6b 100644 --- a/examples/simple_client.rs +++ b/examples/simple_client.rs @@ -10,6 +10,8 @@ use redis::{ use std::thread::sleep; use std::time::{Duration, Instant}; +const SCALE: f32 = 500.0; + fn do_something() -> redis::RedisResult<()> { let client = Client::open("redis://127.0.0.1/")?; let mut con: Connection = client.get_connection()?; @@ -23,7 +25,7 @@ fn do_something() -> redis::RedisResult<()> { for i in 0..128 { let a = (time + i as f32) / 128.0 * std::f32::consts::PI * 2.0; - let r = 4800.0 + (a * 5.0).cos() * (2000.0 * (time / 5.0).cos()); + let r = 24.0 * SCALE + (a * 5.0).cos() * (10.0 * SCALE * (time / 5.0).cos()); let x = a.cos() * r; let y = a.sin() * r;