Make function more convenient to call

This commit is contained in:
Hanno Braun 2025-04-28 14:08:36 +02:00
parent 196e8d41c8
commit 9c63f68cce
2 changed files with 3 additions and 3 deletions

View File

@ -42,8 +42,8 @@ impl AnchoredCurve {
Self::line_from_origin_and_direction(origin, direction)
}
pub fn point_from_local(&self, point: Point<1>) -> Point<3> {
self.origin + self.floating.vector_from_local_point(point)
pub fn point_from_local(&self, point: impl Into<Point<1>>) -> Point<3> {
self.origin + self.floating.vector_from_local_point(point.into())
}
pub fn project_point(&self, point: Point<3>) -> Point<1> {

View File

@ -31,7 +31,7 @@ impl SweptCurve {
pub fn point_from_local(&self, point: impl Into<Point<2>>) -> Point<3> {
let [u, v] = point.into().coords.components;
self.u.point_from_local(Point::from([u])) + self.v * v
self.u.point_from_local([u]) + self.v * v
}
pub fn project_point(&self, point: impl Into<Point<3>>) -> Point<2> {