From 843967f39c83d4301a00d4bb73699fc3a6ca72c3 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 19 Jun 2023 10:52:46 +0200 Subject: [PATCH] Inline method into only use site --- crates/fj-math/src/vector.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/fj-math/src/vector.rs b/crates/fj-math/src/vector.rs index 56e19fed9..08ccea84e 100644 --- a/crates/fj-math/src/vector.rs +++ b/crates/fj-math/src/vector.rs @@ -17,12 +17,6 @@ pub struct Vector { } impl Vector { - /// Construct a `Vector` from an nalgebra vector - pub fn from_na(vector: nalgebra::SVector) -> Self { - let components: [f64; D] = vector.into(); - Self::from(components) - } - /// Convert the vector into an nalgebra vector pub fn to_na(self) -> nalgebra::SVector { self.components.map(Scalar::into_f64).into() @@ -239,7 +233,8 @@ impl, const D: usize> From<[S; D]> for Vector { impl From> for Vector { fn from(vector: nalgebra::SVector) -> Self { - Self::from_na(vector) + let components: [f64; D] = vector.into(); + Vector::from(components) } }