From 57ee42240f440f35ad153c162bef758d0627a824 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 21 Mar 2025 22:46:36 +0100 Subject: [PATCH] Reduce reliance on `nalgebra` --- crates/fj-math/src/vector.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/fj-math/src/vector.rs b/crates/fj-math/src/vector.rs index 3009ac0ef..9cf74802c 100644 --- a/crates/fj-math/src/vector.rs +++ b/crates/fj-math/src/vector.rs @@ -354,7 +354,9 @@ where type Output = Self; fn mul(self, scalar: S) -> Self::Output { - self.to_na().mul(scalar.into().into_f64()).into() + let scalar = scalar.into(); + let components = self.components.map(|v| v * scalar); + Self { components } } }