Skip to content

Commit

Permalink
code compacted
Browse files Browse the repository at this point in the history
  • Loading branch information
podusowski committed Aug 28, 2023
1 parent a9046d3 commit 1912bd3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,7 @@ impl Center {

/// Get the real position at the map's center.
pub fn position(&self, my_position: Position) -> Position {
match self {
Center::MyPosition => my_position,
Center::Exact(position) => *position,
Center::Inertia(position, _, _) => *position,
}
self.detached().unwrap_or(my_position)
}
}

Expand Down

0 comments on commit 1912bd3

Please sign in to comment.