fix clippy
All checks were successful
Rust Checks / checks (push) Successful in 1m12s
Rust Checks / checks (pull_request) Successful in 1m14s

This commit is contained in:
CoCo_Sol 2024-02-21 11:54:45 +01:00
parent 2f0875d60e
commit 83c36c704d

View file

@ -235,7 +235,7 @@ impl<T: Number> Iterator for HexSpiral<T> {
impl<T: Number> HexPosition<T> {
/// Creates a new [HexPosition].
pub fn new(x: T, y: T) -> Self {
pub const fn new(x: T, y: T) -> Self {
Self(x, y)
}
@ -262,7 +262,7 @@ impl<T: Number> HexPosition<T> {
size.0
* 3f32
.sqrt()
.mul_add(T::to_f32(self.0), 3f32.sqrt() / 2.0 * T::to_f32(self.0)),
.mul_add(T::to_f32(self.0), 3f32.sqrt() / 2.0 * T::to_f32(self.1)),
size.1 * (3.0 / 2.0 * T::to_f32(self.1)),
)
}