Skip to content

Commit

Permalink
Merge pull request #1966 from hannobraun/approx
Browse files Browse the repository at this point in the history
Make `ApproxPoint::new` more flexible
  • Loading branch information
hannobraun authored Jul 25, 2023
2 parents fe67c21 + 567e938 commit 895fa6f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/fj-core/src/algorithms/approx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ pub struct ApproxPoint<const D: usize> {

impl<const D: usize> ApproxPoint<D> {
/// Create an instance of `ApproxPoint`, without a source
pub fn new(local_form: Point<D>, global_form: Point<3>) -> Self {
pub fn new(
local_form: impl Into<Point<D>>,
global_form: impl Into<Point<3>>,
) -> Self {
Self {
local_form,
global_form,
local_form: local_form.into(),
global_form: global_form.into(),
}
}
}
Expand Down

0 comments on commit 895fa6f

Please sign in to comment.