| 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 | #[cfg(target_arch = "x86")] |
| 8 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86::*; |
| 9 | #[cfg(target_arch = "x86_64")] |
| 10 | use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::archrust-analyzer cargo core https://github.com/rust-lang/rust/library/core arch/::x86_64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/arch/x86_64/::*; |
| 11 | |
| 12 | #[repr(C)] |
| 13 | union UnionCastrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/UnionCast# { |
| 14 | arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/UnionCast#a.: [u32; 4], |
| 15 | vrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/UnionCast#v.: BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#, |
| 16 | } |
| 17 | |
| 18 | /// A 3-dimensional SIMD vector mask. |
| 19 | /// |
| 20 | /// This type is 16 byte aligned. |
| 21 | #[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:)] |
| 22 | #[repr(transparent)] |
| 23 | pub struct BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#(pub(craterust-analyzer cargo glam 0.25.0 crate/) __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#); |
| 24 | |
| 25 | const MASKrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/MASK.: [u32; 2] = [0, 0xff_ff_ff_ff]; |
| 26 | |
| 27 | impl BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 28 | /// All false. |
| 29 | pub const FALSErust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]FALSE.: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A] = Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]::splatrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]splat().(false); |
| 30 | |
| 31 | /// All true. |
| 32 | pub const TRUErust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]TRUE.: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A] = Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]::splatrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]splat().(true); |
| 33 | |
| 34 | /// Creates a new vector mask. |
| 35 | #[inline(always)] |
| 36 | #[must_use] |
| 37 | pub const fn newrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]new().(x: bool, y: bool, z: bool) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A] { |
| 38 | unsafe { |
| 39 | UnionCastrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/UnionCast# { |
| 40 | arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/UnionCast#a.: [MASKrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().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/sse2/bvec3a/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().y 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/sse2/bvec3a/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().z as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., 0], |
| 41 | } |
| 42 | .vrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/UnionCast#v. |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | /// Creates a vector with all elements set to `v`. |
| 47 | #[inline] |
| 48 | #[must_use] |
| 49 | pub const fn splatrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]splat().(v: bool) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A] { |
| 50 | Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]::newrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]new().(v, v, v) |
| 51 | } |
| 52 | |
| 53 | /// Returns a bitmask with the lowest 3 bits set from the elements of `self`. |
| 54 | /// |
| 55 | /// A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes |
| 56 | /// into the first lowest bit, element `y` into the second, etc. |
| 57 | #[inline] |
| 58 | #[must_use] |
| 59 | pub fn bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().(self) -> u32 { |
| 60 | unsafe { (_mm_movemask_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_movemask_ps().(self.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0.) as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().0x7 } |
| 61 | } |
| 62 | |
| 63 | /// Returns true if any of the elements are true, false otherwise. |
| 64 | #[inline] |
| 65 | #[must_use] |
| 66 | pub fn anyrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]any().(self) -> bool { |
| 67 | self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 |
| 68 | } |
| 69 | |
| 70 | /// Returns true if all the elements are true, false otherwise. |
| 71 | #[inline] |
| 72 | #[must_use] |
| 73 | pub fn allrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]all().(self) -> bool { |
| 74 | self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().0x7 |
| 75 | } |
| 76 | |
| 77 | /// Tests the value at `index`. |
| 78 | /// |
| 79 | /// Panics if `index` is greater than 2. |
| 80 | #[inline] |
| 81 | #[must_use] |
| 82 | pub fn testrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]test().(&self, index: usize) -> bool { |
| 83 | match index { |
| 84 | 0 => (self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().(1 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().0)) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0, |
| 85 | 1 => (self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().(1 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)) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0, |
| 86 | 2 => (self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().(1 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().2)) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0, |
| 87 | _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"), |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | /// Sets the element at `index`. |
| 92 | /// |
| 93 | /// Panics if `index` is greater than 2. |
| 94 | #[inline] |
| 95 | pub fn setrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]set().(&mut self, index: usize, value: bool) { |
| 96 | use craterust-analyzer cargo glam 0.25.0 crate/::Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#; |
| 97 | let mut v = Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#(self.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0.); |
| 98 | v[rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`IndexMut<usize>`]index_mut().index]rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`IndexMut<usize>`]index_mut(). = f32::from_bitsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]from_bits().(MASKrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().value as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().); |
| 99 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A](v.0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0.); |
| 100 | } |
| 101 | |
| 102 | #[inline] |
| 103 | #[must_use] |
| 104 | fn into_bool_arrayrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]into_bool_array().(self) -> [bool; 3] { |
| 105 | let bitmask = self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().(); |
| 106 | [(bitmask rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0, (bitmask rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0, (bitmask rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().4) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0] |
| 107 | } |
| 108 | |
| 109 | #[inline] |
| 110 | #[must_use] |
| 111 | fn into_u32_arrayrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]into_u32_array().(self) -> [u32; 3] { |
| 112 | let bitmask = self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().(); |
| 113 | [ |
| 114 | MASKrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().(bitmask rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().1) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 115 | MASKrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().((bitmask rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().1) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().1) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 116 | MASKrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/MASK.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().((bitmask rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().>>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shr<i32>`]shr().2) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().&rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitAnd<Self>`]bitand().1) as usize]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., |
| 117 | ] |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 122 | #[inline] |
| 123 | fn defaultrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Default]default().() -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Default] { |
| 124 | Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Default]::FALSErust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]FALSE. |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 129 | #[inline] |
| 130 | fn eqrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`PartialEq<Self>`]eq().(&self, rhs: &Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`PartialEq<Self>`]) -> bool { |
| 131 | self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().().eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]eq().(&rhs.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().()) |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | impl Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# {} |
| 136 | |
| 137 | impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/::Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 138 | #[inline] |
| 139 | fn hashrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Hash]hash().<H: corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/::Hasherrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hasher#>(&self, state: &mut H) { |
| 140 | self.bitmaskrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]bitmask().().hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/impls/impl#[u32][Hash]hash().(state); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | impl BitAndrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAnd# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 145 | type Outputrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAnd<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAnd<Self>`]; |
| 146 | #[inline] |
| 147 | fn bitandrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAnd<Self>`]bitand().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAnd<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAnd<Self>`] { |
| 148 | Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAnd<Self>`](unsafe { _mm_and_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_and_ps().(self.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0., rhs.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0.) }) |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | impl BitAndAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAndAssign# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 153 | #[inline] |
| 154 | fn bitand_assignrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAndAssign<Self>`]bitand_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitAndAssign<Self>`]) { |
| 155 | *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/sse2/bvec3a/impl#[BVec3A][`BitAnd<Self>`]bitand().(rhs); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | impl BitOrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOr# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 160 | type Outputrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOr<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOr<Self>`]; |
| 161 | #[inline] |
| 162 | fn bitorrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOr<Self>`]bitor().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOr<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOr<Self>`] { |
| 163 | Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOr<Self>`](unsafe { _mm_or_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_or_ps().(self.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0., rhs.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0.) }) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | impl BitOrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOrAssign# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 168 | #[inline] |
| 169 | fn bitor_assignrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOrAssign<Self>`]bitor_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitOrAssign<Self>`]) { |
| 170 | *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/sse2/bvec3a/impl#[BVec3A][`BitOr<Self>`]bitor().(rhs); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | impl BitXorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXor# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 175 | type Outputrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXor<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXor<Self>`]; |
| 176 | #[inline] |
| 177 | fn bitxorrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXor<Self>`]bitxor().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXor<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXor<Self>`] { |
| 178 | Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXor<Self>`](unsafe { _mm_xor_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_xor_ps().(self.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0., rhs.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0.) }) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | impl BitXorAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXorAssign# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 183 | #[inline] |
| 184 | fn bitxor_assignrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXorAssign<Self>`]bitxor_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][`BitXorAssign<Self>`]) { |
| 185 | *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/sse2/bvec3a/impl#[BVec3A][`BitXor<Self>`]bitxor().(rhs); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | impl Notrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Not# for BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 190 | type Outputrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Not]Output# = Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Not]; |
| 191 | #[inline] |
| 192 | fn notrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Not]not().(self) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Not] { |
| 193 | Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][Not](unsafe { _mm_andnot_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_andnot_ps().(self.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0., _mm_set_ps1rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_set_ps1().(f32::from_bitsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]from_bits().(0xff_ff_ff_ff))) }) |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#> for __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128# { |
| 198 | #[inline] |
| 199 | fn fromrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[__m128][`From<BVec3A>`]from().(t: BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[__m128][`From<BVec3A>`] { |
| 200 | t.0rust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#0. |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | #[cfg(not(target_arch = "spirv"))] |
| 205 | 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 BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 206 | fn fmtrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][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# { |
| 207 | let arr = self.into_u32_arrayrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]into_u32_array().(); |
| 208 | writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!( |
| 209 | f, |
| 210 | "{}({:#x}, {:#x}, {:#x})", |
| 211 | stringifyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/stringify!!(BVec3A), |
| 212 | 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()., |
| 213 | 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()., |
| 214 | arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index(). |
| 215 | ) |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | #[cfg(not(target_arch = "spirv"))] |
| 220 | 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 BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A# { |
| 221 | fn fmtrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A][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# { |
| 222 | let arr = self.into_bool_arrayrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]into_bool_array().(); |
| 223 | 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()., arr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().) |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#> for [bool; 3] { |
| 228 | #[inline] |
| 229 | fn fromrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[`[bool; 3]`][`From<BVec3A>`]from().(mask: BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[`[bool; 3]`][`From<BVec3A>`] { |
| 230 | mask.into_bool_arrayrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]into_bool_array().() |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#> for [u32; 3] { |
| 235 | #[inline] |
| 236 | fn fromrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[`[u32; 3]`][`From<BVec3A>`]from().(mask: BVec3Arust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/BVec3A#) -> Selfrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[`[u32; 3]`][`From<BVec3A>`] { |
| 237 | mask.into_u32_arrayrust-analyzer cargo glam 0.25.0 bool/sse2/bvec3a/impl#[BVec3A]into_u32_array().() |
| 238 | } |
| 239 | } |