Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Shute052 committed Feb 18, 2024
1 parent d5f2cb1 commit 1da7b2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/axislike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,9 @@ impl DeadZoneShape {
radius_x: f32,
radius_y: f32,
) -> Option<DualAxisData> {
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);
Expand Down

0 comments on commit 1da7b2b

Please sign in to comment.