made clippy happy
This commit is contained in:
@@ -83,7 +83,7 @@ impl CatchObject {
|
||||
*last_excess = half_catcher_width;
|
||||
} else {
|
||||
self.hyper_dist = hyper_dist;
|
||||
*last_excess = (hyper_dist as f64).max(0.0).min(half_catcher_width);
|
||||
*last_excess = (hyper_dist as f64).clamp(0.0, half_catcher_width);
|
||||
}
|
||||
|
||||
*last_direction = this_direction;
|
||||
|
||||
@@ -82,9 +82,10 @@ impl Movement {
|
||||
.last_player_position
|
||||
.unwrap_or(current.last_normalized_pos);
|
||||
|
||||
let mut pos = last_player_pos
|
||||
.max(current.normalized_pos - POSITION_EPSILON)
|
||||
.min(current.normalized_pos + POSITION_EPSILON);
|
||||
let mut pos = last_player_pos.clamp(
|
||||
current.normalized_pos - POSITION_EPSILON,
|
||||
current.normalized_pos + POSITION_EPSILON,
|
||||
);
|
||||
|
||||
let dist_moved = pos - last_player_pos;
|
||||
let weighted_strain_time = current.strain_time + 13.0 + (3.0 / current.clock_rate);
|
||||
|
||||
+1
-3
@@ -431,9 +431,7 @@ impl CatchPPInner {
|
||||
if total_hits == 0 {
|
||||
1.0
|
||||
} else {
|
||||
(self.successful_hits() as f64 / total_hits as f64)
|
||||
.max(0.0)
|
||||
.min(1.0)
|
||||
(self.successful_hits() as f64 / total_hits as f64).clamp(0.0, 1.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user