Skip to content

Commit

Permalink
Remove continued_movement_minimum_value
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Jan 3, 2024
1 parent ffe524e commit 1136e0e
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,12 @@ class game_pad_stick_converter final : public pqrs::dispatcher::extra::dispatche
std::sqrt(std::pow(vertical_stick_sensor_.get_value(), 2) +
std::pow(horizontal_stick_sensor_.get_value(), 2)));

auto continued_movement_minimum_value = 0.01;

if (magnitude >= continued_movement_absolute_magnitude_threshold_) {
if (continued_movement_magnitude_ == 0.0) {
auto it = std::max_element(std::begin(delta_magnitude_history_),
std::end(delta_magnitude_history_));
continued_movement_magnitude_ = *it;
}
continued_movement_magnitude_ = std::max(continued_movement_minimum_value, continued_movement_magnitude_);

delta_radian_ = radian;
delta_magnitude_ = continued_movement_magnitude_;
Expand Down

0 comments on commit 1136e0e

Please sign in to comment.