#[repr(C, align(1))]pub struct BVec2 {
pub x: bool,
pub y: bool,
}
Expand description
A 2-dimensional bool
vector mask.
Fields§
§x: bool
§y: bool
Implementations§
source§impl BVec2
impl BVec2
sourcepub const fn from_array(a: [bool; 2]) -> Self
pub const fn from_array(a: [bool; 2]) -> Self
Creates a new vector mask from a bool array.
sourcepub fn bitmask(self) -> u32
pub fn bitmask(self) -> u32
Returns a bitmask with the lowest 2 bits set from the elements of self
.
A true element results in a 1
bit and a false element in a 0
bit. Element x
goes
into the first lowest bit, element y
into the second, etc.
Trait Implementations§
source§impl BitAndAssign<BVec2> for BVec2
impl BitAndAssign<BVec2> for BVec2
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moresource§impl BitOrAssign<BVec2> for BVec2
impl BitOrAssign<BVec2> for BVec2
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moresource§impl BitXorAssign<BVec2> for BVec2
impl BitXorAssign<BVec2> for BVec2
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^=
operation. Read moresource§impl PartialEq<BVec2> for BVec2
impl PartialEq<BVec2> for BVec2
impl Copy for BVec2
impl Eq for BVec2
impl StructuralEq for BVec2
impl StructuralPartialEq for BVec2
Auto Trait Implementations§
impl RefUnwindSafe for BVec2
impl Send for BVec2
impl Sync for BVec2
impl Unpin for BVec2
impl UnwindSafe for BVec2
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more