This commit is contained in:
Quaternions 2024-08-28 13:29:29 -07:00
parent cc3cb35309
commit 1f6594468d

View File

@ -204,6 +204,16 @@ macro_rules! impl_vector {
}
}
impl $struct<bool>{
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<T: core::ops::Neg<Output = T>> core::ops::Neg for $struct<T> {
type Output = Self;