mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-09 12:28:29 +00:00
Make function more convenient to call
This commit is contained in:
parent
196e8d41c8
commit
9c63f68cce
@ -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> {
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user