| 1 | // Generated from vec_mask.rs.tera template. Edit the template, not the generated file. |
| 2 | |
| 3 | #[cfg(not(target_arch = "spirv"))] |
| 4 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/; |
| 5 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::*; |
| 6 | |
| 7 | /// A 2-dimensional `bool` vector mask. |
| 8 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:)] |
| 9 | #[repr(C, align(1))] |
| 10 | pub struct BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 11 | pub xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x.: bool, |
| 12 | pub yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y.: bool, |
| 13 | } |
| 14 | |
| 15 | const MASKrust-analyzer cargo glam 0.25.0 bool/bvec2/MASK.: [u32; 2] = [0, 0xff_ff_ff_ff]; |
| 16 | |
| 17 | impl BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 18 | /// All false. |
| 19 | pub const FALSErust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]FALSE.: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2] = Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]::splatrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]splat().(false); |
| 20 | |
| 21 | /// All true. |
| 22 | pub const TRUErust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]TRUE.: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2] = Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]::splatrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]splat().(true); |
| 23 | |
| 24 | /// Creates a new vector mask. |
| 25 | #[inline(always)] |
| 26 | #[must_use] |
| 27 | pub const fn newrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]new().(x: bool, y: bool) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2] { |
| 28 | Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2] { xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x., yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. } |
| 29 | } |
| 30 | |
| 31 | /// Creates a vector with all elements set to `v`. |
| 32 | #[inline] |
| 33 | #[must_use] |
| 34 | pub const fn splatrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]splat().(v: bool) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2] { |
| 35 | Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]::newrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]new().(v, v) |
| 36 | } |
| 37 | |
| 38 | /// Returns a bitmask with the lowest 2 bits set from the elements of `self`. |
| 39 | /// |
| 40 | /// A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes |
| 41 | /// into the first lowest bit, element `y` into the second, etc. |
| 42 | #[inline] |
| 43 | #[must_use] |
| 44 | pub fn bitmaskrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]bitmask().(self) -> u32 { |
| 45 | (self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().(self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().1 |
| 46 | } |
| 47 | |
| 48 | /// Returns true if any of the elements are true, false otherwise. |
| 49 | #[inline] |
| 50 | #[must_use] |
| 51 | pub fn anyrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]any().(self) -> bool { |
| 52 | self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. || self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. |
| 53 | } |
| 54 | |
| 55 | /// Returns true if all the elements are true, false otherwise. |
| 56 | #[inline] |
| 57 | #[must_use] |
| 58 | pub fn allrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]all().(self) -> bool { |
| 59 | self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. && self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. |
| 60 | } |
| 61 | |
| 62 | /// Tests the value at `index`. |
| 63 | /// |
| 64 | /// Panics if `index` is greater than 1. |
| 65 | #[inline] |
| 66 | #[must_use] |
| 67 | pub fn testrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]test().(&self, index: usize) -> bool { |
| 68 | match index { |
| 69 | 0 => self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x., |
| 70 | 1 => self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y., |
| 71 | _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"), |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | /// Sets the element at `index`. |
| 76 | /// |
| 77 | /// Panics if `index` is greater than 1. |
| 78 | #[inline] |
| 79 | pub fn setrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]set().(&mut self, index: usize, value: bool) { |
| 80 | match index { |
| 81 | 0 => self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. = value, |
| 82 | 1 => self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. = value, |
| 83 | _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"), |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | #[inline] |
| 88 | #[must_use] |
| 89 | fn into_bool_arrayrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]into_bool_array().(self) -> [bool; 2] { |
| 90 | [self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x., self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y.] |
| 91 | } |
| 92 | |
| 93 | #[inline] |
| 94 | #[must_use] |
| 95 | fn into_u32_arrayrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]into_u32_array().(self) -> [u32; 2] { |
| 96 | [MASKrust-analyzer cargo glam 0.25.0 bool/bvec2/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., MASKrust-analyzer cargo glam 0.25.0 bool/bvec2/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().] |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 101 | #[inline] |
| 102 | fn defaultrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Default]default().() -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Default] { |
| 103 | Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Default]::FALSErust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]FALSE. |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | impl BitAndrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAnd# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 108 | type Outputrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAnd<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAnd<Self>`]; |
| 109 | #[inline] |
| 110 | fn bitandrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAnd<Self>`]bitand().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAnd<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAnd<Self>`] { |
| 111 | Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAnd<Self>`] { |
| 112 | xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x.: self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitAnd<Self>`]bitand().rhs.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x., |
| 113 | yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y.: self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitAnd<Self>`]bitand().rhs.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y., |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | impl BitAndAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAndAssign# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 119 | #[inline] |
| 120 | fn bitand_assignrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAndAssign<Self>`]bitand_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAndAssign<Self>`]) { |
| 121 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.bitandrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitAnd<Self>`]bitand().(rhs); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | impl BitOrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOr# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 126 | type Outputrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOr<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOr<Self>`]; |
| 127 | #[inline] |
| 128 | fn bitorrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOr<Self>`]bitor().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOr<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOr<Self>`] { |
| 129 | Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOr<Self>`] { |
| 130 | xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x.: self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitOr<Self>`]bitor().rhs.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x., |
| 131 | yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y.: self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitOr<Self>`]bitor().rhs.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y., |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | impl BitOrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOrAssign# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 137 | #[inline] |
| 138 | fn bitor_assignrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOrAssign<Self>`]bitor_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOrAssign<Self>`]) { |
| 139 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.bitorrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitOr<Self>`]bitor().(rhs); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | impl BitXorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXor# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 144 | type Outputrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXor<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXor<Self>`]; |
| 145 | #[inline] |
| 146 | fn bitxorrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXor<Self>`]bitxor().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXor<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXor<Self>`] { |
| 147 | Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXor<Self>`] { |
| 148 | xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x.: self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitXor<Self>`]bitxor().^rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitXor<Self>`]bitxor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitXor<Self>`]bitxor().rhs.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x., |
| 149 | yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y.: self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitXor<Self>`]bitxor().^rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitXor<Self>`]bitxor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][`BitXor<Self>`]bitxor().rhs.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y., |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | impl BitXorAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXorAssign# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 155 | #[inline] |
| 156 | fn bitxor_assignrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXorAssign<Self>`]bitxor_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXorAssign<Self>`]) { |
| 157 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.bitxorrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][`BitXor<Self>`]bitxor().(rhs); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | impl Notrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Not# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 162 | type Outputrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Not]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Not]; |
| 163 | #[inline] |
| 164 | fn notrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Not]not().(self) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Not] { |
| 165 | Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Not] { |
| 166 | xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x.: !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.xrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#x., |
| 167 | yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y.: !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.yrust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#y., |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | #[cfg(not(target_arch = "spirv"))] |
| 173 | impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 174 | fn fmtrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Debug]fmt().(&self, f: &mut fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 175 | let arr = self.into_u32_arrayrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]into_u32_array().(); |
| 176 | writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{}({:#x}, {:#x})", stringifyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/stringify!!(BVec2), arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().) |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | #[cfg(not(target_arch = "spirv"))] |
| 181 | impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2# { |
| 182 | fn fmtrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2][Display]fmt().(&self, f: &mut fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# { |
| 183 | let arr = self.into_bool_arrayrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]into_bool_array().(); |
| 184 | writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "[{}, {}]", arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().) |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#> for [bool; 2] { |
| 189 | #[inline] |
| 190 | fn fromrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[`[bool; 2]`][`From<BVec2>`]from().(mask: BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[`[bool; 2]`][`From<BVec2>`] { |
| 191 | mask.into_bool_arrayrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]into_bool_array().() |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#> for [u32; 2] { |
| 196 | #[inline] |
| 197 | fn fromrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[`[u32; 2]`][`From<BVec2>`]from().(mask: BVec2rust-analyzer cargo glam 0.25.0 bool/bvec2/BVec2#) -> Selfrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[`[u32; 2]`][`From<BVec2>`] { |
| 198 | mask.into_u32_arrayrust-analyzer cargo glam 0.25.0 bool/bvec2/impl#[BVec2]into_u32_array().() |
| 199 | } |
| 200 | } |