aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-08-09 22:08:48 -0900
committermat <git@matdoes.dev>2025-08-09 22:08:48 -0900
commit3b659833c1ad4cca89b4cd553193edcb6d223163 (patch)
tree6035c6797703dcf0b0240999bae34893f29cd9e8 /azalea-entity/src
parent45cb5823f50ece7af86804d4331bd7ba2f6c5917 (diff)
downloadazalea-drasl-3b659833c1ad4cca89b4cd553193edcb6d223163.tar.xz
clippy
Diffstat (limited to 'azalea-entity/src')
-rw-r--r--azalea-entity/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs
index 095098f1..984cce27 100644
--- a/azalea-entity/src/lib.rs
+++ b/azalea-entity/src/lib.rs
@@ -12,6 +12,7 @@ mod plugin;
pub mod vec_delta_codec;
use std::{
+ f64::consts::PI,
fmt::{self, Debug},
hash::{Hash, Hasher},
};
@@ -59,8 +60,8 @@ pub fn input_vector(direction: LookDirection, speed: f32, acceleration: Vec3) ->
acceleration
}
.scale(speed as f64);
- let y_rot = math::sin(direction.y_rot * (3.141592653589793 / 180.) as f32);
- let x_rot = math::cos(direction.y_rot * (3.141592653589793 / 180.) as f32);
+ let y_rot = math::sin(direction.y_rot * (PI / 180.) as f32);
+ let x_rot = math::cos(direction.y_rot * (PI / 180.) as f32);
Vec3 {
x: acceleration.x * (x_rot as f64) - acceleration.z * (y_rot as f64),
y: acceleration.y,