fix vector bool code
This commit is contained in:
parent
5cdd2c3ee1
commit
488a6b6496
@ -80,15 +80,13 @@ macro_rules! impl_vector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<const N:usize> Vector<N,bool>{
|
impl<const N:usize> Vector<N,bool>{
|
||||||
const ALL:[bool;N]=[true;N];
|
|
||||||
const NONE:[bool;N]=[false;N];
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn all(&self)->bool{
|
pub fn all(&self)->bool{
|
||||||
core::matches!(self.array,ALL)
|
self.array==[true;N]
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn any(&self)->bool{
|
pub fn any(&self)->bool{
|
||||||
!core::matches!(self.array,NONE)
|
self.array!=[false;N]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user