From e572f95f9969872ea1475820b3bb7f363461e6b0 Mon Sep 17 00:00:00 2001 From: CoCoSol007 Date: Wed, 14 Feb 2024 22:20:05 +0100 Subject: [PATCH] Fix cargo clippy --- crates/border-wars/src/map/hex.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/border-wars/src/map/hex.rs b/crates/border-wars/src/map/hex.rs index 7374783..cd94a46 100644 --- a/crates/border-wars/src/map/hex.rs +++ b/crates/border-wars/src/map/hex.rs @@ -77,7 +77,10 @@ impl> HexPosition { /// ``` pub fn to_pixel_coordinates(&self, size: (f32, f32)) -> (f32, f32) { ( - size.0 * (3f32.sqrt() * (self.q.as_()) + 3f32.sqrt() / 2.0 * (self.r.as_())), + size.0 + * 3f32 + .sqrt() + .mul_add(self.q.as_(), 3f32.sqrt() / 2.0 * (self.r.as_())), size.1 * (3.0 / 2.0 * self.r.as_()), ) }