From 567e93875adf8b3f84a3768e659a3784f91e64b2 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 25 Jul 2023 09:58:25 +0200 Subject: [PATCH] Make `ApproxPoint::new` more flexible --- crates/fj-core/src/algorithms/approx/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/mod.rs b/crates/fj-core/src/algorithms/approx/mod.rs index ff0dddd16..7899320ea 100644 --- a/crates/fj-core/src/algorithms/approx/mod.rs +++ b/crates/fj-core/src/algorithms/approx/mod.rs @@ -59,10 +59,13 @@ pub struct ApproxPoint { impl ApproxPoint { /// Create an instance of `ApproxPoint`, without a source - pub fn new(local_form: Point, global_form: Point<3>) -> Self { + pub fn new( + local_form: impl Into>, + global_form: impl Into>, + ) -> Self { Self { - local_form, - global_form, + local_form: local_form.into(), + global_form: global_form.into(), } } }