ButtonInput docs - performance cost adjustment (#13047)

Adjusted the documentation to better describe the performance cost of
`ButtonInput::any_just_pressed|any_just_released|any_pressed`.

Each function iterates the full input, but each check is expected
constant cost. It was described previously as a full input check, and a
full internal list iteration, which I believe is incorrect.
This commit is contained in:
Daniel Miller 2024-04-21 17:42:04 -07:00 committed by GitHub
parent c40b485095
commit 570c43fdd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,9 +41,9 @@ use bevy_ecs::schedule::State;
///
/// | **[`ButtonInput`] operations** | **Computational complexity** |
/// |-----------------------------------|------------------------------------|
/// | [`ButtonInput::any_just_pressed`] | *O*(m*n) |
/// | [`ButtonInput::any_just_released`] | *O*(m*n) |
/// | [`ButtonInput::any_pressed`] | *O*(m*n) |
/// | [`ButtonInput::any_just_pressed`] | *O*(m)~ |
/// | [`ButtonInput::any_just_released`] | *O*(m)~ |
/// | [`ButtonInput::any_pressed`] | *O*(m)~ |
/// | [`ButtonInput::get_just_pressed`] | *O*(n) |
/// | [`ButtonInput::get_just_released`] | *O*(n) |
/// | [`ButtonInput::get_pressed`] | *O*(n) |