diff --git a/fj-math/src/triangle.rs b/fj-math/src/triangle.rs index 6671ac55a..3ccffbac0 100644 --- a/fj-math/src/triangle.rs +++ b/fj-math/src/triangle.rs @@ -16,7 +16,9 @@ impl Triangle { /// # Panics /// /// Panics, if the points don't form a triangle. - pub fn from_points(points: [Point; 3]) -> Self { + pub fn from_points(points: [impl Into>; 3]) -> Self { + let points = points.map(Into::into); + let area = { let [a, b, c] = points.map(Point::to_xyz); (b - a).cross(&(c - a)).magnitude() @@ -61,7 +63,6 @@ where P: Into>, { fn from(points: [P; 3]) -> Self { - let points = points.map(Into::into); Self::from_points(points) } }