fix fmt
Some checks failed
Rust Checks / checks (push) Failing after 5s
Rust Checks / checks (pull_request) Failing after 5s

This commit is contained in:
CoCo_Sol 2024-02-14 10:46:32 +01:00
parent 471f516150
commit b6f7a202b4

View file

@ -21,7 +21,8 @@ impl HexPosition {
/// ///
/// Hexagonal grid using the [cube](https://www.redblobgames.com/grids/hexagons/#coordinates) coordinate system, /// Hexagonal grid using the [cube](https://www.redblobgames.com/grids/hexagons/#coordinates) coordinate system,
/// is like a cube in 2D space. /// is like a cube in 2D space.
/// The Manhattan distance between two positions is equal to: the half of the sum of abs(dx) + abs(dy) + abs(dz) /// The Manhattan distance between two positions is equal to: the half of
/// the sum of abs(dx) + abs(dy) + abs(dz)
/// ///
/// # Example: /// # Example:
/// ///
@ -47,11 +48,13 @@ impl HexPosition {
(dq.abs() + dr.abs() + ds.abs()) as f32 / 2. (dq.abs() + dr.abs() + ds.abs()) as f32 / 2.
} }
/// Returns all positions within a given `range` from the current HexPosition. /// Returns all positions within a given `range` from the current
/// HexPosition.
/// ///
/// This function iterates over the possible q and r values within the specified range /// This function iterates over the possible q and r values within the
/// and inserts HexPositions into a HashSet, ensuring that each generated position /// specified range and inserts HexPositions into a HashSet, ensuring
/// is within the given range from the current position. /// that each generated position is within the given range from the
/// current position.
/// ///
/// for more details: https://www.redblobgames.com/grids/hexagons/#range /// for more details: https://www.redblobgames.com/grids/hexagons/#range
/// ///
@ -75,7 +78,6 @@ impl HexPosition {
} }
result_positions result_positions
} }
} }
impl ops::Add<HexPosition> for HexPosition { impl ops::Add<HexPosition> for HexPosition {