From bcefa64dd192918cfeb1bba27cb4993bec6a17e3 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 10 Sep 2023 18:22:59 -0500 Subject: clippy --- azalea-core/src/math.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-core/src') diff --git a/azalea-core/src/math.rs b/azalea-core/src/math.rs index 40d147e4..6683dd10 100644 --- a/azalea-core/src/math.rs +++ b/azalea-core/src/math.rs @@ -1,9 +1,9 @@ -use std::sync::LazyLock; +use std::{f64::consts::PI, sync::LazyLock}; pub static SIN: LazyLock<[f32; 65536]> = LazyLock::new(|| { let mut sin = [0.0; 65536]; - for i in 0..65536 { - sin[i] = f64::sin((i as f64) * 3.141592653589793 * 2.0 / 65536.0) as f32; + for (i, item) in sin.iter_mut().enumerate() { + *item = f64::sin((i as f64) * PI * 2.0 / 65536.0) as f32; } sin }); -- cgit v1.2.3