mirror of
https://github.com/hannobraun/Fornjot
synced 2025-09-04 08:26:32 +00:00
Make conversion to Point
generic
This commit is contained in:
parent
b75389d622
commit
f237c4a84c
@ -7,9 +7,9 @@ pub struct Point<const D: usize> {
|
|||||||
pub coords: Vector<D>,
|
pub coords: Vector<D>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> From<T> for Point<3>
|
impl<T, const D: usize> From<T> for Point<D>
|
||||||
where
|
where
|
||||||
T: Into<Vector<3>>,
|
T: Into<Vector<D>>,
|
||||||
{
|
{
|
||||||
fn from(coords: T) -> Self {
|
fn from(coords: T) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user