From 345d5737a2e9becda5b61cf9338a479b6a821f7b Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 5 Sep 2024 15:56:35 -0700 Subject: [PATCH] more generic Neg operator --- fixed_wide_vectors/src/macros/vector.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fixed_wide_vectors/src/macros/vector.rs b/fixed_wide_vectors/src/macros/vector.rs index 2ea5dfb..732dbff 100644 --- a/fixed_wide_vectors/src/macros/vector.rs +++ b/fixed_wide_vectors/src/macros/vector.rs @@ -92,10 +92,10 @@ macro_rules! impl_vector { } } - impl> core::ops::Neg for Vector{ - type Output=Self; + impl,V> core::ops::Neg for Vector{ + type Output=Vector; fn neg(self)->Self::Output{ - Self{ + Vector{ array:self.array.map(|t|-t) } }