From 1f6594468d157c11063cd0bc08609837cc11a654 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 28 Aug 2024 13:29:29 -0700 Subject: [PATCH] bvec --- fixed_wide_vectors/src/macros/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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;