Fix the error in the distance calculation function (#58)
All checks were successful
Rust Checks / checks (push) Successful in 1m26s

Reviewed-on: corentin/border-wars#58
Reviewed-by: Tipragot <contact@tipragot.fr>
This commit is contained in:
CoCo_Sol 2024-02-18 18:12:38 +00:00
parent 2b3037d900
commit fa0c47c9fb

View file

@ -256,7 +256,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)),
)
}