diff --git a/src/axislike.rs b/src/axislike.rs index a23f091c..fe6bff15 100644 --- a/src/axislike.rs +++ b/src/axislike.rs @@ -29,7 +29,7 @@ pub struct SingleAxis { /// Any axis value lower than this will trigger the input. pub negative_low: f32, /// How sensitive the axis is to input values. - /// + /// /// Since sensitivity is a multiplier, any value `>1.0` will increase sensitivity while any value `<1.0` will decrease sensitivity. /// Negative values will invert the axis. pub sensitivity: f32, @@ -151,7 +151,7 @@ impl SingleAxis { /// Returns this [`SingleAxis`] with the sensitivity set to the specified value #[must_use] - pub fn with_sensitivity(mut self, sensitivity: f32) -> SingleAxis{ + pub fn with_sensitivity(mut self, sensitivity: f32) -> SingleAxis { self.sensitivity = sensitivity; self } @@ -295,7 +295,7 @@ impl DualAxis { /// Returns this [`DualAxis`] with the sensitivity set to the specified values #[must_use] - pub fn with_sensitivity(mut self, x_sensitivity: f32, y_sensitivity: f32) -> DualAxis{ + pub fn with_sensitivity(mut self, x_sensitivity: f32, y_sensitivity: f32) -> DualAxis { self.x.sensitivity = x_sensitivity; self.y.sensitivity = y_sensitivity; self diff --git a/tests/gamepad_axis.rs b/tests/gamepad_axis.rs index 0faca0a0..cbf31052 100644 --- a/tests/gamepad_axis.rs +++ b/tests/gamepad_axis.rs @@ -231,7 +231,8 @@ fn game_pad_single_axis_inverted() { positive_low: 0.0, negative_low: 0.0, sensitivity: -1.0, - }.inverted(); + } + .inverted(); app.send_input(input); app.update(); let action_state = app.world.resource::>();