diff --git a/fixed_wide_vectors/src/macros/mod.rs b/fixed_wide_vectors/src/macros/mod.rs index abd22ee..fadc426 100644 --- a/fixed_wide_vectors/src/macros/mod.rs +++ b/fixed_wide_vectors/src/macros/mod.rs @@ -204,6 +204,16 @@ macro_rules! impl_vector { } } + impl $struct{ + pub fn all(&self)->bool{ + const ALL:[bool;$size]=[true;$size]; + core::matches!(self.to_array(),ALL) + } + pub fn any(&self)->bool{ + $( self.$field )|| + + } + } + impl> core::ops::Neg for $struct { type Output = Self;