update test
All checks were successful
Rust Checks / checks (push) Successful in 2m35s
Rust Checks / checks (pull_request) Successful in 1m13s

This commit is contained in:
CoCo_Sol 2024-02-14 14:46:15 +01:00
parent 8590c94973
commit b6587abea1

View file

@ -58,7 +58,7 @@ impl<T: HexNumber> HexPosition<T> {
/// let a = HexPosition { q: 0, r: 0 }; /// let a = HexPosition { q: 0, r: 0 };
/// let b = HexPosition { q: 1, r: 1 }; /// let b = HexPosition { q: 1, r: 1 };
/// ///
/// assert_eq!(a.distance_to(&b), 2.0); /// assert_eq!(a.distance_to(&b), 2);
/// ``` /// ```
pub fn distance_to(&self, other: &Self) -> T { pub fn distance_to(&self, other: &Self) -> T {
// dx = |x1 - x2| where x = q // dx = |x1 - x2| where x = q