From 1da7b2be01c8f105ab2be9ba50245f013d5209f7 Mon Sep 17 00:00:00 2001 From: Shute052 Date: Sun, 18 Feb 2024 20:50:33 +0800 Subject: [PATCH] Rename --- src/axislike.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/axislike.rs b/src/axislike.rs index 5359fb707..f546f9a57 100644 --- a/src/axislike.rs +++ b/src/axislike.rs @@ -820,9 +820,9 @@ impl DeadZoneShape { radius_x: f32, radius_y: f32, ) -> Option { - let normalized_x = x / radius_x.max(f32::EPSILON); - let normalized_y = y / radius_y.max(f32::EPSILON); - let is_outside_deadzone = normalized_x.powi(2) + normalized_y.powi(2) >= 1.0; + let x_ratio = x / radius_x.max(f32::EPSILON); + let y_ratio = y / radius_y.max(f32::EPSILON); + let is_outside_deadzone = x_ratio.powi(2) + y_ratio.powi(2) >= 1.0; is_outside_deadzone.then(|| { let new_x = deadzone_axis_value(x, radius_x); let new_y = deadzone_axis_value(y, radius_y);