Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinmorrow committed Jul 20, 2023
1 parent cb33b7b commit c1112bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ fn can_jump(
Option<&Player>,
)>,
) {
let player = query.iter().find(|(_, _, player)| player.is_some()).unwrap().0;
let player = query
.iter()
.find(|(_, _, player)| player.is_some())
.unwrap()
.0;
for collision in collisions.iter() {
let collision = collision.0;

Expand Down
2 changes: 1 addition & 1 deletion src/player/grapple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ fn get_distance_to_window_edge(player: &Transform, window: &Window, direction: V
let distance_to_edge = window_size - player_pos;
let distance_to_edge = distance_to_edge / direction;
let distance_to_edge = (distance_to_edge.x.powf(2.0) + distance_to_edge.y.powf(2.0)).sqrt();

distance_to_edge / 2.0
}

Expand Down

0 comments on commit c1112bc

Please sign in to comment.