Debian Codegraph @

debian/missing-sources/glam-0.20.5/src/vec4.rs

raw symbols SCIP
1 use craterust-analyzer cargo glam 0.20.5 crate/::corerust-analyzer cargo glam 0.20.5 core/::traitsrust-analyzer cargo glam 0.20.5 core/traits/::vectorrust-analyzer cargo glam 0.20.5 core/traits/vector/::*;
2
3 #[cfg(all(
4 any(target_feature = "sse2", target_feature = "simd128"),
5 not(feature = "scalar-math")
6 ))]
7 use craterust-analyzer cargo glam 0.20.5 crate/::BVec4Arust-analyzer cargo glam 0.20.5 vec_mask/BVec4A#;
8 use craterust-analyzer cargo glam 0.20.5 crate/::{BVec4rust-analyzer cargo glam 0.20.5 vec_mask/BVec4#, DVec2rust-analyzer cargo glam 0.20.5 vec2/DVec2#, DVec3rust-analyzer cargo glam 0.20.5 vec3/DVec3#, IVec2rust-analyzer cargo glam 0.20.5 vec2/IVec2#, IVec3rust-analyzer cargo glam 0.20.5 vec3/IVec3#, UVec2rust-analyzer cargo glam 0.20.5 vec2/UVec2#, UVec3rust-analyzer cargo glam 0.20.5 vec3/UVec3#, Vec2rust-analyzer cargo glam 0.20.5 vec2/Vec2#, Vec3rust-analyzer cargo glam 0.20.5 vec3/Vec3#, Vec3Arust-analyzer cargo glam 0.20.5 vec3/Vec3A#, XYZWrust-analyzer cargo glam 0.20.5 core/storage/XYZW#};
9 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::f32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/;
10 #[cfg(not(target_arch = "spirv"))]
11 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/;
12 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::{Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#, Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#};
13 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/::*;
14
15 #[cfg(not(feature = "std"))]
16 use num_traits::Float;
17
18 #[cfg(all(
19 target_arch = "x86",
20 target_feature = "sse2",
21 not(feature = "scalar-math")
22 ))]
23 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::*;
24 #[cfg(all(
25 target_arch = "x86_64",
26 target_feature = "sse2",
27 not(feature = "scalar-math")
28 ))]
29 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/::*;
30
31 #[cfg(all(target_feature = "simd128", not(feature = "scalar-math")))]
32 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/::wasm32::v128;
33
34 macro_rules! impl_vec4_common_methodsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_common_methods! {
35 ($t:ty, $vec2:ident, $vec3:ident, $vec4:ident, $mask:ident, $inner:ident) => {
36 /// All zeroes.
37 pub const ZERO: Self = Self(VectorConst::ZERO);
38
39 /// All ones.
40 pub const ONE: Self = Self(VectorConst::ONE);
41
42 /// `[1, 0, 0, 0]`: a unit-length vector pointing along the positive X axis.
43 pub const X: Self = Self(Vector4Const::X);
44
45 /// `[0, 1, 0, 0]`: a unit-length vector pointing along the positive Y axis.
46 pub const Y: Self = Self(Vector4Const::Y);
47
48 /// `[0, 0, 1, 0]`: a unit-length vector pointing along the positive Z axis.
49 pub const Z: Self = Self(Vector4Const::Z);
50
51 /// `[0, 0, 0, 1]`: a unit-length vector pointing along the positive W axis.
52 pub const W: Self = Self(Vector4Const::W);
53
54 /// The unit axes.
55 pub const AXES: [Self; 4] = [Self::X, Self::Y, Self::Z, Self::W];
56
57 /// Creates a new 4D vector.
58 #[inline(always)]
59 pub fn new(x: $t, y: $t, z: $t, w: $t) -> Self {
60 Self(Vector4::new(x, y, z, w))
61 }
62
63 /// Creates a `Vec3` from the `x`, `y` and `z` elements of `self`, discarding `w`.
64 ///
65 /// Truncation to `Vec3` may also be performed by using `self.xyz()` or `Vec3::from()`.
66 ///
67 /// To truncate to `Vec3A` use `Vec3A::from()`.
68 #[inline(always)]
69 pub fn truncate(self) -> $vec3 {
70 $vec3::new(self.x, self.y, self.z)
71 }
72
73 /// `[x, y, z, w]`
74 #[inline(always)]
75 pub fn to_array(&self) -> [$t; 4] {
76 [self.x, self.y, self.z, self.w]
77 }
78
79 impl_vecn_common_methods!($t, $vec4, $mask, $inner, Vector4);
80 };
81 }
82
83 macro_rules! impl_vec4_common_traitsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_common_traits! {
84 ($t:ty, $new:ident, $vec2:ident, $vec3:ident, $vec4:ident, $mask:ident, $inner:ident) => {
85 /// Creates a 4-dimensional vector.
86 #[inline(always)]
87 pub fn $new(x: $t, y: $t, z: $t, w: $t) -> $vec4 {
88 $vec4::new(x, y, z, w)
89 }
90
91 impl Index<usize> for $vec4 {
92 type Output = $t;
93 #[inline(always)]
94 fn index(&self, index: usize) -> &Self::Output {
95 match index {
96 0 => &self.x,
97 1 => &self.y,
98 2 => &self.z,
99 3 => &self.w,
100 _ => panic!("index out of bounds"),
101 }
102 }
103 }
104
105 impl IndexMut<usize> for $vec4 {
106 #[inline(always)]
107 fn index_mut(&mut self, index: usize) -> &mut Self::Output {
108 match index {
109 0 => &mut self.x,
110 1 => &mut self.y,
111 2 => &mut self.z,
112 3 => &mut self.w,
113 _ => panic!("index out of bounds"),
114 }
115 }
116 }
117
118 #[cfg(not(target_arch = "spirv"))]
119 impl fmt::Debug for $vec4 {
120 fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
121 fmt.debug_tuple(stringify!($vec4))
122 .field(&self.x)
123 .field(&self.y)
124 .field(&self.z)
125 .field(&self.w)
126 .finish()
127 }
128 }
129
130 #[cfg(not(target_arch = "spirv"))]
131 impl fmt::Display for $vec4 {
132 fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
133 write!(fmt, "[{}, {}, {}, {}]", self.x, self.y, self.z, self.w)
134 }
135 }
136
137 impl From<($t, $t, $t, $t)> for $vec4 {
138 #[inline(always)]
139 fn from(t: ($t, $t, $t, $t)) -> Self {
140 Self(Vector4::from_tuple(t))
141 }
142 }
143
144 impl From<$vec4> for ($t, $t, $t, $t) {
145 #[inline(always)]
146 fn from(v: $vec4) -> Self {
147 Vector4::into_tuple(v.0)
148 }
149 }
150
151 impl From<($vec3, $t)> for $vec4 {
152 #[inline(always)]
153 fn from((v, w): ($vec3, $t)) -> Self {
154 Self::new(v.x, v.y, v.z, w)
155 }
156 }
157
158 impl From<($t, $vec3)> for $vec4 {
159 #[inline(always)]
160 fn from((x, v): ($t, $vec3)) -> Self {
161 Self::new(x, v.x, v.y, v.z)
162 }
163 }
164
165 impl From<($vec2, $t, $t)> for $vec4 {
166 #[inline(always)]
167 fn from((v, z, w): ($vec2, $t, $t)) -> Self {
168 Self::new(v.x, v.y, z, w)
169 }
170 }
171
172 impl From<($vec2, $vec2)> for $vec4 {
173 #[inline(always)]
174 fn from((v, u): ($vec2, $vec2)) -> Self {
175 Self::new(v.x, v.y, u.x, u.y)
176 }
177 }
178
179 impl Deref for $vec4 {
180 type Target = XYZW<$t>;
181 #[inline(always)]
182 fn deref(&self) -> &Self::Target {
183 self.0.as_ref_xyzw()
184 }
185 }
186
187 impl DerefMut for $vec4 {
188 #[inline(always)]
189 fn deref_mut(&mut self) -> &mut Self::Target {
190 self.0.as_mut_xyzw()
191 }
192 }
193
194 impl_vecn_common_traits!($t, 4, $vec4, $inner, Vector4);
195 };
196 }
197
198 macro_rules! impl_vec4_signed_methodsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_signed_methods! {
199 ($t:ty, $vec2:ident, $vec3:ident, $vec4:ident, $mask:ident, $inner:ident) => {
200 impl_vec4_common_methods!($t, $vec2, $vec3, $vec4, $mask, $inner);
201 impl_vecn_signed_methods!($t, $vec4, $mask, $inner, SignedVector4);
202 };
203 }
204
205 macro_rules! impl_vec4_signed_traitsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_signed_traits! {
206 ($t:ty, $new:ident, $vec2:ident, $vec3:ident, $vec4:ident, $mask:ident, $inner:ident) => {
207 impl_vec4_common_traits!($t, $new, $vec2, $vec3, $vec4, $mask, $inner);
208 impl_vecn_signed_traits!($t, 4, $vec4, $inner, SignedVector4);
209 };
210 }
211
212 macro_rules! impl_vec4_float_methodsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_float_methods! {
213 ($t:ty, $vec2:ident, $vec3:ident, $vec4:ident, $mask:ident, $inner:ident) => {
214 impl_vec4_signed_methods!($t, $vec2, $vec3, $vec4, $mask, $inner);
215 impl_vecn_float_methods!($t, $vec4, $mask, $inner, FloatVector4);
216 };
217 }
218
219 // implement `Vec4` functionality
220 macro_rules! impl_f32_vec4rust-analyzer cargo glam 0.20.5 vec4/impl_f32_vec4! {
221 ($new:ident, $vec2:ident, $vec3:ident, $vec4:ident, $mask:ident, $inner:ident) => {
222 impl $vec4 {
223 impl_vec4_float_methods!(f32, $vec2, $vec3, $vec4, $mask, $inner);
224 impl_as_dvec4!();
225 impl_as_ivec4!();
226 impl_as_uvec4!();
227 }
228 impl_vec4_signed_traits!(f32, $new, $vec2, $vec3, $vec4, $mask, $inner);
229 };
230 }
231
232 #[cfg(any(
233 not(any(target_feature = "sse2", target_feature = "simd128")),
234 feature = "scalar-math"
235 ))]
236 type XYZWF32 = XYZWrust-analyzer cargo glam 0.20.5 core/storage/XYZW#<f32>;
237
238 #[cfg(all(target_feature = "sse2", not(feature = "scalar-math")))]
239 type XYZWF32rust-analyzer cargo glam 0.20.5 vec4/XYZWF32# = __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128#;
240
241 #[cfg(all(target_feature = "simd128", not(feature = "scalar-math")))]
242 type XYZWF32 = v128;
243
244 /// A 4-dimensional vector.
245 ///
246 /// This type uses 16 byte aligned SIMD vector type for storage on supported platforms.
247 #[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:)]
248 #[cfg_attr(
249 any(
250 not(any(
251 feature = "scalar-math",
252 target_arch = "spirv",
253 target_feature = "sse2",
254 target_feature = "simd128"
255 )),
256 feature = "cuda"
257 ),
258 repr(C, align(16))
259 )]
260 #[cfg_attr(
261 all(
262 any(
263 feature = "scalar-math",
264 target_arch = "spirv",
265 target_feature = "sse2",
266 target_feature = "simd128"
267 ),
268 not(feature = "cuda")
269 ),
270 repr(transparent)
271 )]
272 pub struct Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4#(pub(craterust-analyzer cargo glam 0.20.5 crate/) XYZWF32rust-analyzer cargo glam 0.20.5 vec4/XYZWF32#);
273
274 #[cfg(any(
275 not(any(target_feature = "sse2", target_feature = "simd128")),
276 feature = "scalar-math"
277 ))]
278 impl_f32_vec4rust-analyzer cargo glam 0.20.5 vec4/impl_f32_vec4!!(vec4, Vec2, Vec3, Vec4, BVec4, XYZWF32);
279
280 #[cfg(all(
281 any(target_feature = "sse2", target_feature = "simd128"),
282 not(feature = "scalar-math")
283 ))]
284 impl_f32_vec4rust-analyzer cargo glam 0.20.5 vec4/impl_f32_vec4!!(vec4rust-analyzer cargo glam 0.20.5 vec4/vec4()., Vec2rust-analyzer cargo glam 0.20.5 vec2/Vec2#, Vec3rust-analyzer cargo glam 0.20.5 vec3/Vec3#, Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4#, BVec4Arust-analyzer cargo glam 0.20.5 vec_mask/BVec4A#, XYZWF32rust-analyzer cargo glam 0.20.5 vec4/XYZWF32#);
285
286 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4#> for Vec3Arust-analyzer cargo glam 0.20.5 vec3/Vec3A# {
287 /// Creates a `Vec3A` from the `x`, `y` and `z` elements of `self` discarding `w`.
288 ///
289 /// On architectures where SIMD is supported such as SSE2 on `x86_64` this conversion is a noop.
290 #[inline(always)]
291 fn fromrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec3A][`From<Vec4>`]from().(v: Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4#) -> Selfrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec3A][`From<Vec4>`] {
292 #[allow(clippy::useless_conversion)]
293 Selfrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec3A][`From<Vec4>`](v.0rust-analyzer cargo glam 0.20.5 vec4/Vec4#0..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())
294 }
295 }
296
297 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<(Vec3Arust-analyzer cargo glam 0.20.5 vec3/Vec3A#, f32)> for Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4# {
298 #[inline(always)]
299 fn fromrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec4][`From<(Vec3A, f32)>`]from().((v, w): (Vec3Arust-analyzer cargo glam 0.20.5 vec3/Vec3A#, f32)) -> Selfrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec4][`From<(Vec3A, f32)>`] {
300 v.extendrust-analyzer cargo glam 0.20.5 vec3/impl#[Vec3A]extend().(w)
301 }
302 }
303
304 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<(f32, Vec3Arust-analyzer cargo glam 0.20.5 vec3/Vec3A#)> for Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4# {
305 #[inline(always)]
306 fn fromrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec4][`From<(f32, Vec3A)>`]from().((x, v): (f32, Vec3Arust-analyzer cargo glam 0.20.5 vec3/Vec3A#)) -> Selfrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec4][`From<(f32, Vec3A)>`] {
307 Selfrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec4][`From<(f32, Vec3A)>`]::newrust-analyzer cargo glam 0.20.5 vec4/impl#[Vec4]new().(x, v.xrust-analyzer cargo glam 0.20.5 core/storage/XYZ#x., v.yrust-analyzer cargo glam 0.20.5 core/storage/XYZ#y., v.zrust-analyzer cargo glam 0.20.5 core/storage/XYZ#z.)
308 }
309 }
310
311 type XYZWF64rust-analyzer cargo glam 0.20.5 vec4/XYZWF64# = XYZWrust-analyzer cargo glam 0.20.5 core/storage/XYZW#<f64>;
312
313 /// A 4-dimensional vector.
314 #[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:)]
315 #[cfg_attr(not(feature = "cuda"), repr(transparent))]
316 #[cfg_attr(feature = "cuda", repr(C, align(16)))]
317 pub struct DVec4rust-analyzer cargo glam 0.20.5 vec4/DVec4#(pub(craterust-analyzer cargo glam 0.20.5 crate/) XYZWF64rust-analyzer cargo glam 0.20.5 vec4/XYZWF64#);
318
319 impl DVec4rust-analyzer cargo glam 0.20.5 vec4/DVec4# {
320 impl_vec4_float_methodsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_float_methods!!(f64, DVec2, DVec3rust-analyzer cargo glam 0.20.5 vec3/DVec3#, DVec4rust-analyzer cargo glam 0.20.5 vec4/DVec4#, BVec4rust-analyzer cargo glam 0.20.5 vec_mask/BVec4#, XYZWF64rust-analyzer cargo glam 0.20.5 vec4/XYZWF64#);
321 impl_as_vec4rust-analyzer cargo glam 0.20.5 vec/impl_as_vec4!!();
322 impl_as_ivec4rust-analyzer cargo glam 0.20.5 vec/impl_as_ivec4!!();
323 impl_as_uvec4rust-analyzer cargo glam 0.20.5 vec/impl_as_uvec4!!();
324 }
325 impl_vec4_signed_traitsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_signed_traits!!(f64, dvec4rust-analyzer cargo glam 0.20.5 vec4/dvec4()., DVec2rust-analyzer cargo glam 0.20.5 vec2/DVec2#, DVec3rust-analyzer cargo glam 0.20.5 vec3/DVec3#, DVec4rust-analyzer cargo glam 0.20.5 vec4/DVec4#, BVec4, XYZWF64rust-analyzer cargo glam 0.20.5 vec4/XYZWF64#);
326
327 type XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32# = XYZWrust-analyzer cargo glam 0.20.5 core/storage/XYZW#<i32>;
328
329 /// A 4-dimensional vector.
330 #[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:)]
331 #[cfg_attr(not(feature = "cuda"), repr(transparent))]
332 #[cfg_attr(feature = "cuda", repr(C, align(16)))]
333 pub struct IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#(pub(craterust-analyzer cargo glam 0.20.5 crate/) XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
334
335 impl IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4# {
336 impl_vec4_signed_methodsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_signed_methods!!(i32, IVec2, IVec3rust-analyzer cargo glam 0.20.5 vec3/IVec3#, IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, BVec4rust-analyzer cargo glam 0.20.5 vec_mask/BVec4#, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
337 impl_as_vec4rust-analyzer cargo glam 0.20.5 vec/impl_as_vec4!!();
338 impl_as_dvec4rust-analyzer cargo glam 0.20.5 vec/impl_as_dvec4!!();
339 impl_as_uvec4rust-analyzer cargo glam 0.20.5 vec/impl_as_uvec4!!();
340 }
341 impl_vec4_signed_traitsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_signed_traits!!(i32, ivec4rust-analyzer cargo glam 0.20.5 vec4/ivec4()., IVec2rust-analyzer cargo glam 0.20.5 vec2/IVec2#, IVec3rust-analyzer cargo glam 0.20.5 vec3/IVec3#, IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, BVec4, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
342 impl_vecn_eq_hash_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_eq_hash_traits!!(i32, 4, IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#);
343
344 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, i8, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
345 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, i16, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
346 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, i32, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
347 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, u8, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
348 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, u16, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
349 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, u32, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
350
351 impl_vecn_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
352 impl_vecn_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_shift_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
353
354 impl_vecn_scalar_bit_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_bit_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, i32, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
355
356 impl_vecn_bit_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_bit_op_traits!!(IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, XYZWI32rust-analyzer cargo glam 0.20.5 vec4/XYZWI32#);
357
358 type XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32# = XYZWrust-analyzer cargo glam 0.20.5 core/storage/XYZW#<u32>;
359
360 /// A 4-dimensional vector.
361 #[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:)]
362 #[cfg_attr(not(feature = "cuda"), repr(transparent))]
363 #[cfg_attr(feature = "cuda", repr(C, align(16)))]
364 pub struct UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#(pub(craterust-analyzer cargo glam 0.20.5 crate/) XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
365
366 impl UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4# {
367 impl_vec4_common_methodsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_common_methods!!(u32, UVec2, UVec3rust-analyzer cargo glam 0.20.5 vec3/UVec3#, UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, BVec4rust-analyzer cargo glam 0.20.5 vec_mask/BVec4#, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
368 impl_as_vec4rust-analyzer cargo glam 0.20.5 vec/impl_as_vec4!!();
369 impl_as_dvec4rust-analyzer cargo glam 0.20.5 vec/impl_as_dvec4!!();
370 impl_as_ivec4rust-analyzer cargo glam 0.20.5 vec/impl_as_ivec4!!();
371 }
372 impl_vec4_common_traitsrust-analyzer cargo glam 0.20.5 vec4/impl_vec4_common_traits!!(u32, uvec4rust-analyzer cargo glam 0.20.5 vec4/uvec4()., UVec2rust-analyzer cargo glam 0.20.5 vec2/UVec2#, UVec3rust-analyzer cargo glam 0.20.5 vec3/UVec3#, UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, BVec4, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
373 impl_vecn_eq_hash_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_eq_hash_traits!!(u32, 4, UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#);
374
375 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, i8, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
376 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, i16, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
377 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, i32, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
378 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, u8, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
379 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, u16, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
380 impl_vecn_scalar_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, u32, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
381
382 impl_vecn_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
383 impl_vecn_shift_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_shift_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
384
385 impl_vecn_scalar_bit_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_scalar_bit_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, u32, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
386
387 impl_vecn_bit_op_traitsrust-analyzer cargo glam 0.20.5 vec/impl_vecn_bit_op_traits!!(UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#, XYZWU32rust-analyzer cargo glam 0.20.5 vec4/XYZWU32#);
388
389 mod const_test_vec4rust-analyzer cargo glam 0.20.5 vec4/const_test_vec4/ {
390 #[cfg(all(
391 any(feature = "scalar-math", target_arch = "spirv"),
392 not(feature = "cuda")
393 ))]
394 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(
395 core::mem::align_of::<f32>(),
396 core::mem::align_of::<super::Vec4>()
397 );
398 #[cfg(not(any(feature = "scalar-math", target_arch = "spirv")))]
399 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(16, corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4#>());
400 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(16, corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::Vec4rust-analyzer cargo glam 0.20.5 vec4/Vec4#>());
401 }
402
403 mod const_test_dvec4rust-analyzer cargo glam 0.20.5 vec4/const_test_dvec4/ {
404 #[cfg(not(feature = "cuda"))]
405 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(
406 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<f64>(),
407 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::DVec4rust-analyzer cargo glam 0.20.5 vec4/DVec4#>()
408 );
409 #[cfg(feature = "cuda")]
410 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(16, core::mem::align_of::<super::DVec4>());
411 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(32, corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::DVec4rust-analyzer cargo glam 0.20.5 vec4/DVec4#>());
412 }
413
414 mod const_test_ivec4rust-analyzer cargo glam 0.20.5 vec4/const_test_ivec4/ {
415 #[cfg(not(feature = "cuda"))]
416 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(
417 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<i32>(),
418 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#>()
419 );
420 #[cfg(feature = "cuda")]
421 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(16, core::mem::align_of::<super::IVec4>());
422 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(16, corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::IVec4rust-analyzer cargo glam 0.20.5 vec4/IVec4#>());
423 }
424
425 mod const_test_uvec4rust-analyzer cargo glam 0.20.5 vec4/const_test_uvec4/ {
426 #[cfg(not(feature = "cuda"))]
427 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(
428 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<u32>(),
429 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::align_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/align_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#>()
430 );
431 #[cfg(feature = "cuda")]
432 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(16, core::mem::align_of::<super::UVec4>());
433 const_assert_eqrust-analyzer cargo glam 0.20.5 macros/const_assert_eq!!(16, corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::memrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/::size_ofrust-analyzer cargo core https://github.com/rust-lang/rust/library/core mem/size_of().::<superrust-analyzer cargo glam 0.20.5 vec4/::UVec4rust-analyzer cargo glam 0.20.5 vec4/UVec4#>());
434 }