Make conversion to Point generic

This commit is contained in:
Hanno Braun 2024-12-17 20:32:40 +01:00
parent b75389d622
commit f237c4a84c

View File

@ -7,9 +7,9 @@ pub struct Point<const D: usize> {
pub coords: Vector<D>,
}
impl<T> From<T> for Point<3>
impl<T, const D: usize> From<T> for Point<D>
where
T: Into<Vector<3>>,
T: Into<Vector<D>>,
{
fn from(coords: T) -> Self {
Self {