diff --git a/src/point.rs b/src/point.rs index aef5e0c..a50c92f 100644 --- a/src/point.rs +++ b/src/point.rs @@ -82,7 +82,7 @@ macro_rules! impl_point { impl $PointN { /// Construct a new point, using the provided values. #[inline] - pub fn new($($field: S),+) -> $PointN { + pub const fn new($($field: S),+) -> $PointN { $PointN { $($field: $field),+ } } diff --git a/src/vector.rs b/src/vector.rs index 72366c6..16b31d1 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -358,7 +358,7 @@ macro_rules! impl_vector_default { impl $VectorN { /// Construct a new vector, using the provided values. #[inline] - pub fn new($($field: S),+) -> $VectorN { + pub const fn new($($field: S),+) -> $VectorN { $VectorN { $($field: $field),+ } } }