update
Some checks failed
Rust Checks / checks (push) Failing after 22s
Rust Checks / checks (pull_request) Failing after 20s

This commit is contained in:
CoCo_Sol 2024-02-14 17:34:54 +01:00
parent 648bbf9c61
commit 4c08cd83c4

View file

@ -8,8 +8,8 @@ use num::Signed;
use partial_min_max::{max, min}; use partial_min_max::{max, min};
/// Represents a number that can be used in a hexagonal grid. /// Represents a number that can be used in a hexagonal grid.
pub trait HexNumber: Signed + PartialEq + Copy + PartialOrd {} pub trait HexNumber: Signed + PartialEq + Copy + PartialOrd + FromPrimitive {}
impl<T: Signed + PartialEq + Copy + PartialOrd> HexNumber for T {} impl<T: Signed + PartialEq + Copy + PartialOrd + FromPrimitive> HexNumber for T {}
/// Represents a position in a hexagonal grid. /// Represents a position in a hexagonal grid.
/// We use the axial coordinate system explained in this /// We use the axial coordinate system explained in this