Fix all clippy lint errors

This commit is contained in:
Keavon Chambers
2021-12-30 23:05:54 -08:00
parent 401bba878a
commit 5a184a179c
18 changed files with 123 additions and 140 deletions
+3 -5
View File
@@ -58,13 +58,11 @@ impl SnapHandler {
.unwrap_or(0.),
);
// Do not move if over snap tolerance
let clamped_closest_move = DVec2::new(
// Clamp, do not move if over snap tolerance
DVec2::new(
if closest_move.x.abs() > SNAP_TOLERANCE { 0. } else { closest_move.x },
if closest_move.y.abs() > SNAP_TOLERANCE { 0. } else { closest_move.y },
);
clamped_closest_move
)
} else {
DVec2::ZERO
}