Skip to content

Commit f7c8eb7

Browse files
committed
Correct docs for ButtonSettingsError to read 0.0..=1.0 (#6570)
# Objective The [documentation for `ButtonSettingsError`](https://docs.rs/bevy/0.9.0/bevy/input/gamepad/enum.ButtonSettingsError.html) incorrectly describes the valid range of values as `0.0..=2.0`, probably because it was copied from `AxisSettingsError`. The actual range, as seen in the functions that return it and in its own `thiserror` description, is `0.0..=1.0`. ## Solution Update the doc comments to reflect the correct range. Co-authored-by: Sol Toder <[email protected]>
1 parent 920543c commit f7c8eb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_input/src/gamepad.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ pub enum AxisSettingsError {
4040
/// Errors that occur when setting button settings for gamepad input.
4141
#[derive(Error, Debug, PartialEq)]
4242
pub enum ButtonSettingsError {
43-
/// The given parameter was not in range 0.0..=2.0.
43+
/// The given parameter was not in range 0.0..=1.0.
4444
#[error("invalid release_threshold {0}, expected value [0.0..=1.0]")]
4545
ReleaseThresholdOutOfRange(f32),
46-
/// The given parameter was not in range 0.0..=2.0.
46+
/// The given parameter was not in range 0.0..=1.0.
4747
#[error("invalid press_threshold {0}, expected [0.0..=1.0]")]
4848
PressThresholdOutOfRange(f32),
4949
/// Parameter `release_threshold` was not less than or equal to `press_threshold`.

0 commit comments

Comments
 (0)