aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src/math.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-09-10 18:22:59 -0500
committermat <git@matdoes.dev>2023-09-10 18:22:59 -0500
commitbcefa64dd192918cfeb1bba27cb4993bec6a17e3 (patch)
treeb41767a60677e3fe90db1b0f22fca523d90d18b9 /azalea-core/src/math.rs
parent5f8704ccc51d75a05a2441fdd1a8cc9e2ff90173 (diff)
downloadazalea-drasl-bcefa64dd192918cfeb1bba27cb4993bec6a17e3.tar.xz
clippy
Diffstat (limited to 'azalea-core/src/math.rs')
-rw-r--r--azalea-core/src/math.rs6
1 files changed, 3 insertions, 3 deletions
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
});