[−][src]Struct bevy_math::Vec2Mask
A 2-dimensional vector mask.
This type is typically created by comparison methods on Vec2
.
Implementations
impl Vec2Mask
[src]
pub fn new(x: bool, y: bool) -> Vec2Mask
[src]
Creates a new Vec2Mask
.
pub fn bitmask(self) -> u32
[src]
Returns a bitmask with the lowest two 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.
pub fn any(self) -> bool
[src]
Returns true if any of the elements are true, false otherwise.
In other words: x || y
.
pub fn all(self) -> bool
[src]
Returns true if all the elements are true, false otherwise.
In other words: x && y
.
pub fn select(self, if_true: Vec2, if_false: Vec2) -> Vec2
[src]
Creates a Vec2
from the elements in if_true
and if_false
, selecting which to use for
each element of self
.
A true element in the mask uses the corresponding element from if_true
, and false uses
the element from if_false
.
Trait Implementations
impl AsRef<[u32; 2]> for Vec2Mask
[src]
impl BitAnd<Vec2Mask> for Vec2Mask
[src]
type Output = Vec2Mask
The resulting type after applying the &
operator.
pub fn bitand(self, other: Vec2Mask) -> Vec2Mask
[src]
impl BitAndAssign<Vec2Mask> for Vec2Mask
[src]
pub fn bitand_assign(&mut self, other: Vec2Mask)
[src]
impl BitOr<Vec2Mask> for Vec2Mask
[src]
type Output = Vec2Mask
The resulting type after applying the |
operator.
pub fn bitor(self, other: Vec2Mask) -> Vec2Mask
[src]
impl BitOrAssign<Vec2Mask> for Vec2Mask
[src]
pub fn bitor_assign(&mut self, other: Vec2Mask)
[src]
impl Clone for Vec2Mask
[src]
impl Copy for Vec2Mask
[src]
impl Debug for Vec2Mask
[src]
impl Default for Vec2Mask
[src]
impl Display for Vec2Mask
[src]
impl Eq for Vec2Mask
[src]
impl Hash for Vec2Mask
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Not for Vec2Mask
[src]
type Output = Vec2Mask
The resulting type after applying the !
operator.
pub fn not(self) -> Vec2Mask
[src]
impl Ord for Vec2Mask
[src]
pub fn cmp(&self, other: &Vec2Mask) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Vec2Mask> for Vec2Mask
[src]
impl PartialOrd<Vec2Mask> for Vec2Mask
[src]
pub fn partial_cmp(&self, other: &Vec2Mask) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Vec2Mask) -> bool
[src]
pub fn le(&self, other: &Vec2Mask) -> bool
[src]
pub fn gt(&self, other: &Vec2Mask) -> bool
[src]
pub fn ge(&self, other: &Vec2Mask) -> bool
[src]
impl StructuralEq for Vec2Mask
[src]
impl StructuralPartialEq for Vec2Mask
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vec2Mask
impl Send for Vec2Mask
impl Sync for Vec2Mask
impl Unpin for Vec2Mask
impl UnwindSafe for Vec2Mask
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,