Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
100-TomatoJuice committed Aug 31, 2023
1 parent 58cd442 commit 9da8266
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/axislike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests/gamepad_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<ActionState<AxislikeTestAction>>();
Expand Down

0 comments on commit 9da8266

Please sign in to comment.