• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitshifter / glam-rs / 28366758540

29 Jun 2026 10:51AM UTC coverage: 99.11% (-0.004%) from 99.114%
28366758540

Pull #755

github

web-flow
Merge d1e86c0a3 into c9bb1a29f
Pull Request #755: Issue 514

82 of 97 new or added lines in 13 files covered. (84.54%)

9 existing lines in 3 files now uncovered.

95275 of 96131 relevant lines covered (99.11%)

119626.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

98.27
/src/usize/usizevec3.rs
1
// Generated from vec.rs.tera template. Edit the template, not the generated file.
2

3
use crate::{BVec3, BVec3A, USizeVec2, USizeVec4};
4

5
#[cfg(feature = "u8")]
6
use crate::U8Vec3;
7

8
#[cfg(feature = "u16")]
9
use crate::U16Vec3;
10

11
#[cfg(feature = "i8")]
12
use crate::I8Vec3;
13

14
#[cfg(feature = "i16")]
15
use crate::I16Vec3;
16

17
#[cfg(feature = "i32")]
18
use crate::IVec3;
19

20
#[cfg(feature = "i64")]
21
use crate::I64Vec3;
22

23
#[cfg(feature = "u32")]
24
use crate::UVec3;
25

26
#[cfg(feature = "u64")]
27
use crate::U64Vec3;
28

29
#[cfg(feature = "isize")]
30
use crate::ISizeVec3;
31

32
use core::fmt;
33
use core::iter::{Product, Sum};
34
use core::{f32, ops::*};
35

36
#[cfg(feature = "zerocopy")]
37
use zerocopy_derive::*;
38

39
/// Creates a 3-dimensional vector.
40
#[inline(always)]
41
#[must_use]
42
pub const fn usizevec3(x: usize, y: usize, z: usize) -> USizeVec3 {
543✔
43
    USizeVec3::new(x, y, z)
543✔
44
}
543✔
45

46
/// A 3-dimensional vector.
47
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
48
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
49
#[cfg_attr(
50
    feature = "zerocopy",
51
    derive(FromBytes, Immutable, IntoBytes, KnownLayout)
52
)]
53
#[repr(C)]
54
#[cfg_attr(target_arch = "spirv", rust_gpu::vector::v1)]
55
pub struct USizeVec3 {
56
    pub x: usize,
57
    pub y: usize,
58
    pub z: usize,
59
}
60

61
impl USizeVec3 {
62
    /// All zeroes.
63
    pub const ZERO: Self = Self::splat(0);
64

65
    /// All ones.
66
    pub const ONE: Self = Self::splat(1);
67

68
    /// All `usize::MIN`.
69
    pub const MIN: Self = Self::splat(usize::MIN);
70

71
    /// All `usize::MAX`.
72
    pub const MAX: Self = Self::splat(usize::MAX);
73

74
    /// A unit vector pointing along the positive X axis.
75
    pub const X: Self = Self::new(1, 0, 0);
76

77
    /// A unit vector pointing along the positive Y axis.
78
    pub const Y: Self = Self::new(0, 1, 0);
79

80
    /// A unit vector pointing along the positive Z axis.
81
    pub const Z: Self = Self::new(0, 0, 1);
82

83
    /// The unit axes.
84
    pub const AXES: [Self; 3] = [Self::X, Self::Y, Self::Z];
85

86
    /// Creates a new vector.
87
    #[inline(always)]
88
    #[must_use]
89
    pub const fn new(x: usize, y: usize, z: usize) -> Self {
15,680✔
90
        Self { x, y, z }
15,680✔
91
    }
15,680✔
92

93
    /// Creates a vector with all elements set to `v`.
94
    #[inline]
95
    #[must_use]
96
    pub const fn splat(v: usize) -> Self {
12✔
97
        Self { x: v, y: v, z: v }
12✔
98
    }
12✔
99

100
    /// Returns a vector containing each element of `self` modified by a mapping function `f`.
101
    #[inline]
102
    #[must_use]
103
    pub fn map<F>(self, mut f: F) -> Self
8✔
104
    where
8✔
105
        F: FnMut(usize) -> usize,
8✔
106
    {
107
        Self::new(f(self.x), f(self.y), f(self.z))
8✔
108
    }
8✔
109

110
    /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
111
    /// for each element of `self`.
112
    ///
113
    /// A true element in the mask uses the corresponding element from `if_true`, and false
114
    /// uses the element from `if_false`.
115
    #[inline]
116
    #[must_use]
117
    pub fn select(mask: BVec3, if_true: Self, if_false: Self) -> Self {
16✔
118
        Self {
119
            x: if mask.test(0) { if_true.x } else { if_false.x },
16✔
120
            y: if mask.test(1) { if_true.y } else { if_false.y },
16✔
121
            z: if mask.test(2) { if_true.z } else { if_false.z },
16✔
122
        }
123
    }
16✔
124

125
    /// Creates a new vector from an array.
126
    #[inline]
127
    #[must_use]
128
    pub const fn from_array(a: [usize; 3]) -> Self {
4✔
129
        Self::new(a[0], a[1], a[2])
4✔
130
    }
4✔
131

132
    /// Converts `self` to `[x, y, z]`
133
    #[inline]
134
    #[must_use]
135
    pub const fn to_array(&self) -> [usize; 3] {
16✔
136
        [self.x, self.y, self.z]
16✔
137
    }
16✔
138

139
    /// Creates a vector from the first 3 values in `slice`.
140
    ///
141
    /// # Panics
142
    ///
143
    /// Panics if `slice` is less than 3 elements long.
144
    #[inline]
145
    #[must_use]
146
    pub const fn from_slice(slice: &[usize]) -> Self {
12✔
147
        assert!(slice.len() >= 3);
12✔
148
        Self::new(slice[0], slice[1], slice[2])
8✔
149
    }
8✔
150

151
    /// Writes the elements of `self` to the first 3 elements in `slice`.
152
    ///
153
    /// # Panics
154
    ///
155
    /// Panics if `slice` is less than 3 elements long.
156
    #[inline]
157
    pub fn write_to_slice(self, slice: &mut [usize]) {
12✔
158
        slice[..3].copy_from_slice(&self.to_array());
12✔
159
    }
12✔
160

161
    /// Internal method for creating a 3D vector from a 4D vector, discarding `w`.
162
    #[allow(dead_code)]
163
    #[inline]
164
    #[must_use]
165
    pub(crate) fn from_vec4(v: USizeVec4) -> Self {
×
166
        Self {
×
167
            x: v.x,
×
168
            y: v.y,
×
169
            z: v.z,
×
170
        }
×
171
    }
×
172

173
    /// Creates a 4D vector from `self` and the given `w` value.
174
    #[inline]
175
    #[must_use]
176
    pub fn extend(self, w: usize) -> USizeVec4 {
4✔
177
        USizeVec4::new(self.x, self.y, self.z, w)
4✔
178
    }
4✔
179

180
    /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.
181
    ///
182
    /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].
183
    #[inline]
184
    #[must_use]
185
    pub fn truncate(self) -> USizeVec2 {
×
186
        use crate::swizzles::Vec3Swizzles;
187
        self.xy()
×
188
    }
×
189

190
    /// Creates a 3D vector from `self` with the given value of `x`.
191
    #[inline]
192
    #[must_use]
193
    pub fn with_x(mut self, x: usize) -> Self {
4✔
194
        self.x = x;
4✔
195
        self
4✔
196
    }
4✔
197

198
    /// Creates a 3D vector from `self` with the given value of `y`.
199
    #[inline]
200
    #[must_use]
201
    pub fn with_y(mut self, y: usize) -> Self {
4✔
202
        self.y = y;
4✔
203
        self
4✔
204
    }
4✔
205

206
    /// Creates a 3D vector from `self` with the given value of `z`.
207
    #[inline]
208
    #[must_use]
209
    pub fn with_z(mut self, z: usize) -> Self {
4✔
210
        self.z = z;
4✔
211
        self
4✔
212
    }
4✔
213

214
    /// Computes the dot product of `self` and `rhs`.
215
    #[inline]
216
    #[must_use]
217
    pub fn dot(self, rhs: Self) -> usize {
20✔
218
        (self.x * rhs.x) + (self.y * rhs.y) + (self.z * rhs.z)
20✔
219
    }
20✔
220

221
    /// Returns a vector where every component is the dot product of `self` and `rhs`.
222
    #[inline]
223
    #[must_use]
224
    pub fn dot_into_vec(self, rhs: Self) -> Self {
4✔
225
        Self::splat(self.dot(rhs))
4✔
226
    }
4✔
227

228
    /// Computes the cross product of `self` and `rhs`.
229
    #[inline]
230
    #[must_use]
231
    pub fn cross(self, rhs: Self) -> Self {
8✔
232
        Self {
8✔
233
            x: self.y * rhs.z - rhs.y * self.z,
8✔
234
            y: self.z * rhs.x - rhs.z * self.x,
8✔
235
            z: self.x * rhs.y - rhs.x * self.y,
8✔
236
        }
8✔
237
    }
8✔
238

239
    /// Returns a vector containing the minimum values for each element of `self` and `rhs`.
240
    ///
241
    /// In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.
242
    #[inline]
243
    #[must_use]
244
    pub fn min(self, rhs: Self) -> Self {
32✔
245
        Self {
246
            x: if self.x < rhs.x { self.x } else { rhs.x },
32✔
247
            y: if self.y < rhs.y { self.y } else { rhs.y },
32✔
248
            z: if self.z < rhs.z { self.z } else { rhs.z },
32✔
249
        }
250
    }
32✔
251

252
    /// Returns a vector containing the maximum values for each element of `self` and `rhs`.
253
    ///
254
    /// In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.
255
    #[inline]
256
    #[must_use]
257
    pub fn max(self, rhs: Self) -> Self {
32✔
258
        Self {
259
            x: if self.x > rhs.x { self.x } else { rhs.x },
32✔
260
            y: if self.y > rhs.y { self.y } else { rhs.y },
32✔
261
            z: if self.z > rhs.z { self.z } else { rhs.z },
32✔
262
        }
263
    }
32✔
264

265
    /// Component-wise clamping of values, similar to [`usize::clamp`].
266
    ///
267
    /// Each element in `min` must be less-or-equal to the corresponding element in `max`.
268
    ///
269
    /// # Panics
270
    ///
271
    /// Will panic if `min` is greater than `max` when `glam_assert` is enabled.
272
    #[inline]
273
    #[must_use]
274
    pub fn clamp(self, min: Self, max: Self) -> Self {
28✔
275
        glam_assert!(min.cmple(max).all(), "clamp: expected min <= max");
28✔
276
        self.max(min).min(max)
24✔
277
    }
24✔
278

279
    /// Returns the horizontal minimum of `self`.
280
    ///
281
    /// In other words this computes `min(x, y, ..)`.
282
    #[inline]
283
    #[must_use]
284
    pub fn min_element(self) -> usize {
16✔
285
        let min = |a, b| if a < b { a } else { b };
32✔
286
        min(self.x, min(self.y, self.z))
16✔
287
    }
16✔
288

289
    /// Returns the horizontal maximum of `self`.
290
    ///
291
    /// In other words this computes `max(x, y, ..)`.
292
    #[inline]
293
    #[must_use]
294
    pub fn max_element(self) -> usize {
16✔
295
        let max = |a, b| if a > b { a } else { b };
32✔
296
        max(self.x, max(self.y, self.z))
16✔
297
    }
16✔
298

299
    /// Returns the index of the first minimum element of `self`.
300
    #[doc(alias = "argmin")]
301
    #[inline]
302
    #[must_use]
303
    pub fn min_position(self) -> usize {
20✔
304
        let mut min = self.x;
20✔
305
        let mut index = 0;
20✔
306
        if self.y < min {
20✔
307
            min = self.y;
8✔
308
            index = 1;
8✔
309
        }
12✔
310
        if self.z < min {
20✔
311
            index = 2;
4✔
312
        }
16✔
313
        index
20✔
314
    }
20✔
315

316
    /// Returns the index of the first maximum element of `self`.
317
    #[doc(alias = "argmax")]
318
    #[inline]
319
    #[must_use]
320
    pub fn max_position(self) -> usize {
20✔
321
        let mut max = self.x;
20✔
322
        let mut index = 0;
20✔
323
        if self.y > max {
20✔
324
            max = self.y;
8✔
325
            index = 1;
8✔
326
        }
12✔
327
        if self.z > max {
20✔
328
            index = 2;
4✔
329
        }
16✔
330
        index
20✔
331
    }
20✔
332

333
    /// Returns the sum of all elements of `self`.
334
    ///
335
    /// In other words, this computes `self.x + self.y + ..`.
336
    #[inline]
337
    #[must_use]
338
    pub fn element_sum(self) -> usize {
4✔
339
        self.x + self.y + self.z
4✔
340
    }
4✔
341

342
    /// Returns the product of all elements of `self`.
343
    ///
344
    /// In other words, this computes `self.x * self.y * ..`.
345
    #[inline]
346
    #[must_use]
347
    pub fn element_product(self) -> usize {
4✔
348
        self.x * self.y * self.z
4✔
349
    }
4✔
350

351
    /// Returns a vector mask containing the result of a `==` comparison for each element of
352
    /// `self` and `rhs`.
353
    ///
354
    /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all
355
    /// elements.
356
    #[inline]
357
    #[must_use]
358
    pub fn cmpeq(self, rhs: Self) -> BVec3 {
12✔
359
        BVec3::new(self.x.eq(&rhs.x), self.y.eq(&rhs.y), self.z.eq(&rhs.z))
12✔
360
    }
12✔
361

362
    /// Returns a vector mask containing the result of a `!=` comparison for each element of
363
    /// `self` and `rhs`.
364
    ///
365
    /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all
366
    /// elements.
367
    #[inline]
368
    #[must_use]
369
    pub fn cmpne(self, rhs: Self) -> BVec3 {
8✔
370
        BVec3::new(self.x.ne(&rhs.x), self.y.ne(&rhs.y), self.z.ne(&rhs.z))
8✔
371
    }
8✔
372

373
    /// Returns a vector mask containing the result of a `>=` comparison for each element of
374
    /// `self` and `rhs`.
375
    ///
376
    /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all
377
    /// elements.
378
    #[inline]
379
    #[must_use]
380
    pub fn cmpge(self, rhs: Self) -> BVec3 {
16✔
381
        BVec3::new(self.x.ge(&rhs.x), self.y.ge(&rhs.y), self.z.ge(&rhs.z))
16✔
382
    }
16✔
383

384
    /// Returns a vector mask containing the result of a `>` comparison for each element of
385
    /// `self` and `rhs`.
386
    ///
387
    /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all
388
    /// elements.
389
    #[inline]
390
    #[must_use]
391
    pub fn cmpgt(self, rhs: Self) -> BVec3 {
4✔
392
        BVec3::new(self.x.gt(&rhs.x), self.y.gt(&rhs.y), self.z.gt(&rhs.z))
4✔
393
    }
4✔
394

395
    /// Returns a vector mask containing the result of a `<=` comparison for each element of
396
    /// `self` and `rhs`.
397
    ///
398
    /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all
399
    /// elements.
400
    #[inline]
401
    #[must_use]
402
    pub fn cmple(self, rhs: Self) -> BVec3 {
44✔
403
        BVec3::new(self.x.le(&rhs.x), self.y.le(&rhs.y), self.z.le(&rhs.z))
44✔
404
    }
44✔
405

406
    /// Returns a vector mask containing the result of a `<` comparison for each element of
407
    /// `self` and `rhs`.
408
    ///
409
    /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all
410
    /// elements.
411
    #[inline]
412
    #[must_use]
413
    pub fn cmplt(self, rhs: Self) -> BVec3 {
24✔
414
        BVec3::new(self.x.lt(&rhs.x), self.y.lt(&rhs.y), self.z.lt(&rhs.z))
24✔
415
    }
24✔
416

417
    /// Computes the squared length of `self`.
418
    #[doc(alias = "magnitude2")]
419
    #[inline]
420
    #[must_use]
421
    pub fn length_squared(self) -> usize {
8✔
422
        self.dot(self)
8✔
423
    }
8✔
424

425
    /// Computes the [manhattan distance] between two points.
426
    ///
427
    /// # Overflow
428
    /// This method may overflow if the result is greater than [`usize::MAX`].
429
    ///
430
    /// See also [`checked_manhattan_distance`][USizeVec3::checked_manhattan_distance].
431
    ///
432
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
433
    #[inline]
434
    #[must_use]
435
    pub fn manhattan_distance(self, rhs: Self) -> usize {
8✔
436
        self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
8✔
437
    }
8✔
438

439
    /// Computes the [manhattan distance] between two points.
440
    ///
441
    /// This will returns [`None`] if the result is greater than [`usize::MAX`].
442
    ///
443
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
444
    #[inline]
445
    #[must_use]
446
    pub fn checked_manhattan_distance(self, rhs: Self) -> Option<usize> {
12✔
447
        let d = self.x.abs_diff(rhs.x);
12✔
448
        let d = d.checked_add(self.y.abs_diff(rhs.y))?;
12✔
449
        d.checked_add(self.z.abs_diff(rhs.z))
8✔
450
    }
12✔
451

452
    /// Computes the [chebyshev distance] between two points.
453
    ///
454
    /// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
455
    #[inline]
456
    #[must_use]
457
    pub fn chebyshev_distance(self, rhs: Self) -> usize {
8✔
458
        // Note: the compiler will eventually optimize out the loop
459
        [
8✔
460
            self.x.abs_diff(rhs.x),
8✔
461
            self.y.abs_diff(rhs.y),
8✔
462
            self.z.abs_diff(rhs.z),
8✔
463
        ]
8✔
464
        .into_iter()
8✔
465
        .max()
8✔
466
        .unwrap()
8✔
467
    }
8✔
468

469
    /// Casts all elements of `self` to `f32`.
470
    #[inline]
471
    #[must_use]
472
    pub fn as_vec3(self) -> crate::Vec3 {
12✔
473
        crate::Vec3::new(self.x as f32, self.y as f32, self.z as f32)
12✔
474
    }
12✔
475

476
    /// Casts all elements of `self` to `f32`.
477
    #[inline]
478
    #[must_use]
479
    pub fn as_vec3a(self) -> crate::Vec3A {
12✔
480
        crate::Vec3A::new(self.x as f32, self.y as f32, self.z as f32)
12✔
481
    }
12✔
482

483
    /// Casts all elements of `self` to `f64`.
484
    #[cfg(feature = "f64")]
485
    #[inline]
486
    #[must_use]
487
    pub fn as_dvec3(self) -> crate::DVec3 {
12✔
488
        crate::DVec3::new(self.x as f64, self.y as f64, self.z as f64)
12✔
489
    }
12✔
490

491
    /// Casts all elements of `self` to `i8`.
492
    #[cfg(feature = "i8")]
493
    #[inline]
494
    #[must_use]
495
    pub fn as_i8vec3(self) -> crate::I8Vec3 {
12✔
496
        crate::I8Vec3::new(self.x as i8, self.y as i8, self.z as i8)
12✔
497
    }
12✔
498

499
    /// Casts all elements of `self` to `u8`.
500
    #[cfg(feature = "u8")]
501
    #[inline]
502
    #[must_use]
503
    pub fn as_u8vec3(self) -> crate::U8Vec3 {
12✔
504
        crate::U8Vec3::new(self.x as u8, self.y as u8, self.z as u8)
12✔
505
    }
12✔
506

507
    /// Casts all elements of `self` to `i16`.
508
    #[cfg(feature = "i16")]
509
    #[inline]
510
    #[must_use]
511
    pub fn as_i16vec3(self) -> crate::I16Vec3 {
12✔
512
        crate::I16Vec3::new(self.x as i16, self.y as i16, self.z as i16)
12✔
513
    }
12✔
514

515
    /// Casts all elements of `self` to `u16`.
516
    #[cfg(feature = "u16")]
517
    #[inline]
518
    #[must_use]
519
    pub fn as_u16vec3(self) -> crate::U16Vec3 {
12✔
520
        crate::U16Vec3::new(self.x as u16, self.y as u16, self.z as u16)
12✔
521
    }
12✔
522

523
    /// Casts all elements of `self` to `i32`.
524
    #[cfg(feature = "i32")]
525
    #[inline]
526
    #[must_use]
527
    pub fn as_ivec3(self) -> crate::IVec3 {
12✔
528
        crate::IVec3::new(self.x as i32, self.y as i32, self.z as i32)
12✔
529
    }
12✔
530

531
    /// Casts all elements of `self` to `u32`.
532
    #[cfg(feature = "u32")]
533
    #[inline]
534
    #[must_use]
535
    pub fn as_uvec3(self) -> crate::UVec3 {
12✔
536
        crate::UVec3::new(self.x as u32, self.y as u32, self.z as u32)
12✔
537
    }
12✔
538

539
    /// Casts all elements of `self` to `i64`.
540
    #[cfg(feature = "i64")]
541
    #[inline]
542
    #[must_use]
543
    pub fn as_i64vec3(self) -> crate::I64Vec3 {
12✔
544
        crate::I64Vec3::new(self.x as i64, self.y as i64, self.z as i64)
12✔
545
    }
12✔
546

547
    /// Casts all elements of `self` to `u64`.
548
    #[cfg(feature = "u64")]
549
    #[inline]
550
    #[must_use]
551
    pub fn as_u64vec3(self) -> crate::U64Vec3 {
12✔
552
        crate::U64Vec3::new(self.x as u64, self.y as u64, self.z as u64)
12✔
553
    }
12✔
554

555
    /// Casts all elements of `self` to `isize`.
556
    #[cfg(feature = "isize")]
557
    #[inline]
558
    #[must_use]
559
    pub fn as_isizevec3(self) -> crate::ISizeVec3 {
12✔
560
        crate::ISizeVec3::new(self.x as isize, self.y as isize, self.z as isize)
12✔
561
    }
12✔
562

563
    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
564
    ///
565
    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
566
    #[inline]
567
    #[must_use]
568
    pub const fn checked_add(self, rhs: Self) -> Option<Self> {
20✔
569
        let x = match self.x.checked_add(rhs.x) {
20✔
570
            Some(v) => v,
12✔
571
            None => return None,
8✔
572
        };
573
        let y = match self.y.checked_add(rhs.y) {
12✔
574
            Some(v) => v,
8✔
575
            None => return None,
4✔
576
        };
577
        let z = match self.z.checked_add(rhs.z) {
8✔
578
            Some(v) => v,
4✔
579
            None => return None,
4✔
580
        };
581

582
        Some(Self { x, y, z })
4✔
583
    }
20✔
584

585
    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
586
    ///
587
    /// In other words this computes `Some([self.x - rhs.x, self.y - rhs.y, ..])` but returns `None` on any overflow.
588
    #[inline]
589
    #[must_use]
590
    pub const fn checked_sub(self, rhs: Self) -> Option<Self> {
20✔
591
        let x = match self.x.checked_sub(rhs.x) {
20✔
592
            Some(v) => v,
12✔
593
            None => return None,
8✔
594
        };
595
        let y = match self.y.checked_sub(rhs.y) {
12✔
596
            Some(v) => v,
8✔
597
            None => return None,
4✔
598
        };
599
        let z = match self.z.checked_sub(rhs.z) {
8✔
600
            Some(v) => v,
4✔
601
            None => return None,
4✔
602
        };
603

604
        Some(Self { x, y, z })
4✔
605
    }
20✔
606

607
    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
608
    ///
609
    /// In other words this computes `Some([self.x * rhs.x, self.y * rhs.y, ..])` but returns `None` on any overflow.
610
    #[inline]
611
    #[must_use]
612
    pub const fn checked_mul(self, rhs: Self) -> Option<Self> {
20✔
613
        let x = match self.x.checked_mul(rhs.x) {
20✔
614
            Some(v) => v,
16✔
615
            None => return None,
4✔
616
        };
617
        let y = match self.y.checked_mul(rhs.y) {
16✔
618
            Some(v) => v,
16✔
619
            None => return None,
×
620
        };
621
        let z = match self.z.checked_mul(rhs.z) {
16✔
622
            Some(v) => v,
16✔
623
            None => return None,
×
624
        };
625

626
        Some(Self { x, y, z })
16✔
627
    }
20✔
628

629
    /// Returns a vector containing the wrapping division of `self` and `rhs`.
630
    ///
631
    /// In other words this computes `Some([self.x / rhs.x, self.y / rhs.y, ..])` but returns `None` on any division by zero.
632
    #[inline]
633
    #[must_use]
634
    pub const fn checked_div(self, rhs: Self) -> Option<Self> {
24✔
635
        let x = match self.x.checked_div(rhs.x) {
24✔
636
            Some(v) => v,
12✔
637
            None => return None,
12✔
638
        };
639
        let y = match self.y.checked_div(rhs.y) {
12✔
640
            Some(v) => v,
8✔
641
            None => return None,
4✔
642
        };
643
        let z = match self.z.checked_div(rhs.z) {
8✔
644
            Some(v) => v,
8✔
645
            None => return None,
×
646
        };
647

648
        Some(Self { x, y, z })
8✔
649
    }
24✔
650

651
    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
652
    ///
653
    /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.
654
    #[inline]
655
    #[must_use]
656
    pub const fn wrapping_add(self, rhs: Self) -> Self {
4✔
657
        Self {
4✔
658
            x: self.x.wrapping_add(rhs.x),
4✔
659
            y: self.y.wrapping_add(rhs.y),
4✔
660
            z: self.z.wrapping_add(rhs.z),
4✔
661
        }
4✔
662
    }
4✔
663

664
    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
665
    ///
666
    /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.
667
    #[inline]
668
    #[must_use]
669
    pub const fn wrapping_sub(self, rhs: Self) -> Self {
4✔
670
        Self {
4✔
671
            x: self.x.wrapping_sub(rhs.x),
4✔
672
            y: self.y.wrapping_sub(rhs.y),
4✔
673
            z: self.z.wrapping_sub(rhs.z),
4✔
674
        }
4✔
675
    }
4✔
676

677
    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
678
    ///
679
    /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.
680
    #[inline]
681
    #[must_use]
682
    pub const fn wrapping_mul(self, rhs: Self) -> Self {
4✔
683
        Self {
4✔
684
            x: self.x.wrapping_mul(rhs.x),
4✔
685
            y: self.y.wrapping_mul(rhs.y),
4✔
686
            z: self.z.wrapping_mul(rhs.z),
4✔
687
        }
4✔
688
    }
4✔
689

690
    /// Returns a vector containing the wrapping division of `self` and `rhs`.
691
    ///
692
    /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.
693
    #[inline]
694
    #[must_use]
695
    pub const fn wrapping_div(self, rhs: Self) -> Self {
4✔
696
        Self {
4✔
697
            x: self.x.wrapping_div(rhs.x),
4✔
698
            y: self.y.wrapping_div(rhs.y),
4✔
699
            z: self.z.wrapping_div(rhs.z),
4✔
700
        }
4✔
701
    }
4✔
702

703
    /// Returns a vector containing the saturating addition of `self` and `rhs`.
704
    ///
705
    /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.
706
    #[inline]
707
    #[must_use]
708
    pub const fn saturating_add(self, rhs: Self) -> Self {
4✔
709
        Self {
4✔
710
            x: self.x.saturating_add(rhs.x),
4✔
711
            y: self.y.saturating_add(rhs.y),
4✔
712
            z: self.z.saturating_add(rhs.z),
4✔
713
        }
4✔
714
    }
4✔
715

716
    /// Returns a vector containing the saturating subtraction of `self` and `rhs`.
717
    ///
718
    /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.
719
    #[inline]
720
    #[must_use]
721
    pub const fn saturating_sub(self, rhs: Self) -> Self {
4✔
722
        Self {
4✔
723
            x: self.x.saturating_sub(rhs.x),
4✔
724
            y: self.y.saturating_sub(rhs.y),
4✔
725
            z: self.z.saturating_sub(rhs.z),
4✔
726
        }
4✔
727
    }
4✔
728

729
    /// Returns a vector containing the saturating multiplication of `self` and `rhs`.
730
    ///
731
    /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.
732
    #[inline]
733
    #[must_use]
734
    pub const fn saturating_mul(self, rhs: Self) -> Self {
4✔
735
        Self {
4✔
736
            x: self.x.saturating_mul(rhs.x),
4✔
737
            y: self.y.saturating_mul(rhs.y),
4✔
738
            z: self.z.saturating_mul(rhs.z),
4✔
739
        }
4✔
740
    }
4✔
741

742
    /// Returns a vector containing the saturating division of `self` and `rhs`.
743
    ///
744
    /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.
745
    #[inline]
746
    #[must_use]
747
    pub const fn saturating_div(self, rhs: Self) -> Self {
4✔
748
        Self {
4✔
749
            x: self.x.saturating_div(rhs.x),
4✔
750
            y: self.y.saturating_div(rhs.y),
4✔
751
            z: self.z.saturating_div(rhs.z),
4✔
752
        }
4✔
753
    }
4✔
754

755
    /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.
756
    ///
757
    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
758
    #[cfg(feature = "isize")]
759
    #[inline]
760
    #[must_use]
761
    pub const fn checked_add_signed(self, rhs: ISizeVec3) -> Option<Self> {
8✔
762
        let x = match self.x.checked_add_signed(rhs.x) {
8✔
763
            Some(v) => v,
4✔
764
            None => return None,
4✔
765
        };
766
        let y = match self.y.checked_add_signed(rhs.y) {
4✔
767
            Some(v) => v,
4✔
768
            None => return None,
×
769
        };
770
        let z = match self.z.checked_add_signed(rhs.z) {
4✔
771
            Some(v) => v,
4✔
772
            None => return None,
×
773
        };
774

775
        Some(Self { x, y, z })
4✔
776
    }
8✔
777

778
    /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.
779
    ///
780
    /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.
781
    #[cfg(feature = "isize")]
782
    #[inline]
783
    #[must_use]
784
    pub const fn wrapping_add_signed(self, rhs: ISizeVec3) -> Self {
4✔
785
        Self {
4✔
786
            x: self.x.wrapping_add_signed(rhs.x),
4✔
787
            y: self.y.wrapping_add_signed(rhs.y),
4✔
788
            z: self.z.wrapping_add_signed(rhs.z),
4✔
789
        }
4✔
790
    }
4✔
791

792
    /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`.
793
    ///
794
    /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.
795
    #[cfg(feature = "isize")]
796
    #[inline]
797
    #[must_use]
798
    pub const fn saturating_add_signed(self, rhs: ISizeVec3) -> Self {
4✔
799
        Self {
4✔
800
            x: self.x.saturating_add_signed(rhs.x),
4✔
801
            y: self.y.saturating_add_signed(rhs.y),
4✔
802
            z: self.z.saturating_add_signed(rhs.z),
4✔
803
        }
4✔
804
    }
4✔
805
}
806

807
impl Default for USizeVec3 {
808
    #[inline(always)]
UNCOV
809
    fn default() -> Self {
×
UNCOV
810
        Self::ZERO
×
UNCOV
811
    }
×
812
}
813

814
impl Div for USizeVec3 {
815
    type Output = Self;
816
    #[inline]
817
    fn div(self, rhs: Self) -> Self {
28✔
818
        Self {
28✔
819
            x: self.x.div(rhs.x),
28✔
820
            y: self.y.div(rhs.y),
28✔
821
            z: self.z.div(rhs.z),
28✔
822
        }
28✔
823
    }
28✔
824
}
825

826
impl Div<&Self> for USizeVec3 {
827
    type Output = Self;
828
    #[inline]
829
    fn div(self, rhs: &Self) -> Self {
4✔
830
        self.div(*rhs)
4✔
831
    }
4✔
832
}
833

834
impl Div<&USizeVec3> for &USizeVec3 {
835
    type Output = USizeVec3;
836
    #[inline]
837
    fn div(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
838
        (*self).div(*rhs)
4✔
839
    }
4✔
840
}
841

842
impl Div<USizeVec3> for &USizeVec3 {
843
    type Output = USizeVec3;
844
    #[inline]
845
    fn div(self, rhs: USizeVec3) -> USizeVec3 {
4✔
846
        (*self).div(rhs)
4✔
847
    }
4✔
848
}
849

850
impl DivAssign for USizeVec3 {
851
    #[inline]
852
    fn div_assign(&mut self, rhs: Self) {
12✔
853
        self.x.div_assign(rhs.x);
12✔
854
        self.y.div_assign(rhs.y);
12✔
855
        self.z.div_assign(rhs.z);
12✔
856
    }
12✔
857
}
858

859
impl DivAssign<&Self> for USizeVec3 {
860
    #[inline]
861
    fn div_assign(&mut self, rhs: &Self) {
4✔
862
        self.div_assign(*rhs);
4✔
863
    }
4✔
864
}
865

866
impl Div<usize> for USizeVec3 {
867
    type Output = Self;
868
    #[inline]
869
    fn div(self, rhs: usize) -> Self {
28✔
870
        Self {
28✔
871
            x: self.x.div(rhs),
28✔
872
            y: self.y.div(rhs),
28✔
873
            z: self.z.div(rhs),
28✔
874
        }
28✔
875
    }
28✔
876
}
877

878
impl Div<&usize> for USizeVec3 {
879
    type Output = Self;
880
    #[inline]
881
    fn div(self, rhs: &usize) -> Self {
4✔
882
        self.div(*rhs)
4✔
883
    }
4✔
884
}
885

886
impl Div<&usize> for &USizeVec3 {
887
    type Output = USizeVec3;
888
    #[inline]
889
    fn div(self, rhs: &usize) -> USizeVec3 {
4✔
890
        (*self).div(*rhs)
4✔
891
    }
4✔
892
}
893

894
impl Div<usize> for &USizeVec3 {
895
    type Output = USizeVec3;
896
    #[inline]
897
    fn div(self, rhs: usize) -> USizeVec3 {
4✔
898
        (*self).div(rhs)
4✔
899
    }
4✔
900
}
901

902
impl DivAssign<usize> for USizeVec3 {
903
    #[inline]
904
    fn div_assign(&mut self, rhs: usize) {
16✔
905
        self.x.div_assign(rhs);
16✔
906
        self.y.div_assign(rhs);
16✔
907
        self.z.div_assign(rhs);
16✔
908
    }
16✔
909
}
910

911
impl DivAssign<&usize> for USizeVec3 {
912
    #[inline]
913
    fn div_assign(&mut self, rhs: &usize) {
4✔
914
        self.div_assign(*rhs);
4✔
915
    }
4✔
916
}
917

918
impl Div<USizeVec3> for usize {
919
    type Output = USizeVec3;
920
    #[inline]
921
    fn div(self, rhs: USizeVec3) -> USizeVec3 {
28✔
922
        USizeVec3 {
28✔
923
            x: self.div(rhs.x),
28✔
924
            y: self.div(rhs.y),
28✔
925
            z: self.div(rhs.z),
28✔
926
        }
28✔
927
    }
28✔
928
}
929

930
impl Div<&USizeVec3> for usize {
931
    type Output = USizeVec3;
932
    #[inline]
933
    fn div(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
934
        self.div(*rhs)
4✔
935
    }
4✔
936
}
937

938
impl Div<&USizeVec3> for &usize {
939
    type Output = USizeVec3;
940
    #[inline]
941
    fn div(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
942
        (*self).div(*rhs)
4✔
943
    }
4✔
944
}
945

946
impl Div<USizeVec3> for &usize {
947
    type Output = USizeVec3;
948
    #[inline]
949
    fn div(self, rhs: USizeVec3) -> USizeVec3 {
4✔
950
        (*self).div(rhs)
4✔
951
    }
4✔
952
}
953

954
impl Mul for USizeVec3 {
955
    type Output = Self;
956
    #[inline]
957
    fn mul(self, rhs: Self) -> Self {
52✔
958
        Self {
52✔
959
            x: self.x.mul(rhs.x),
52✔
960
            y: self.y.mul(rhs.y),
52✔
961
            z: self.z.mul(rhs.z),
52✔
962
        }
52✔
963
    }
52✔
964
}
965

966
impl Mul<&Self> for USizeVec3 {
967
    type Output = Self;
968
    #[inline]
969
    fn mul(self, rhs: &Self) -> Self {
4✔
970
        self.mul(*rhs)
4✔
971
    }
4✔
972
}
973

974
impl Mul<&USizeVec3> for &USizeVec3 {
975
    type Output = USizeVec3;
976
    #[inline]
977
    fn mul(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
978
        (*self).mul(*rhs)
4✔
979
    }
4✔
980
}
981

982
impl Mul<USizeVec3> for &USizeVec3 {
983
    type Output = USizeVec3;
984
    #[inline]
985
    fn mul(self, rhs: USizeVec3) -> USizeVec3 {
4✔
986
        (*self).mul(rhs)
4✔
987
    }
4✔
988
}
989

990
impl MulAssign for USizeVec3 {
991
    #[inline]
992
    fn mul_assign(&mut self, rhs: Self) {
12✔
993
        self.x.mul_assign(rhs.x);
12✔
994
        self.y.mul_assign(rhs.y);
12✔
995
        self.z.mul_assign(rhs.z);
12✔
996
    }
12✔
997
}
998

999
impl MulAssign<&Self> for USizeVec3 {
1000
    #[inline]
1001
    fn mul_assign(&mut self, rhs: &Self) {
4✔
1002
        self.mul_assign(*rhs);
4✔
1003
    }
4✔
1004
}
1005

1006
impl Mul<usize> for USizeVec3 {
1007
    type Output = Self;
1008
    #[inline]
1009
    fn mul(self, rhs: usize) -> Self {
28✔
1010
        Self {
28✔
1011
            x: self.x.mul(rhs),
28✔
1012
            y: self.y.mul(rhs),
28✔
1013
            z: self.z.mul(rhs),
28✔
1014
        }
28✔
1015
    }
28✔
1016
}
1017

1018
impl Mul<&usize> for USizeVec3 {
1019
    type Output = Self;
1020
    #[inline]
1021
    fn mul(self, rhs: &usize) -> Self {
4✔
1022
        self.mul(*rhs)
4✔
1023
    }
4✔
1024
}
1025

1026
impl Mul<&usize> for &USizeVec3 {
1027
    type Output = USizeVec3;
1028
    #[inline]
1029
    fn mul(self, rhs: &usize) -> USizeVec3 {
4✔
1030
        (*self).mul(*rhs)
4✔
1031
    }
4✔
1032
}
1033

1034
impl Mul<usize> for &USizeVec3 {
1035
    type Output = USizeVec3;
1036
    #[inline]
1037
    fn mul(self, rhs: usize) -> USizeVec3 {
4✔
1038
        (*self).mul(rhs)
4✔
1039
    }
4✔
1040
}
1041

1042
impl MulAssign<usize> for USizeVec3 {
1043
    #[inline]
1044
    fn mul_assign(&mut self, rhs: usize) {
16✔
1045
        self.x.mul_assign(rhs);
16✔
1046
        self.y.mul_assign(rhs);
16✔
1047
        self.z.mul_assign(rhs);
16✔
1048
    }
16✔
1049
}
1050

1051
impl MulAssign<&usize> for USizeVec3 {
1052
    #[inline]
1053
    fn mul_assign(&mut self, rhs: &usize) {
4✔
1054
        self.mul_assign(*rhs);
4✔
1055
    }
4✔
1056
}
1057

1058
impl Mul<USizeVec3> for usize {
1059
    type Output = USizeVec3;
1060
    #[inline]
1061
    fn mul(self, rhs: USizeVec3) -> USizeVec3 {
36✔
1062
        USizeVec3 {
36✔
1063
            x: self.mul(rhs.x),
36✔
1064
            y: self.mul(rhs.y),
36✔
1065
            z: self.mul(rhs.z),
36✔
1066
        }
36✔
1067
    }
36✔
1068
}
1069

1070
impl Mul<&USizeVec3> for usize {
1071
    type Output = USizeVec3;
1072
    #[inline]
1073
    fn mul(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1074
        self.mul(*rhs)
4✔
1075
    }
4✔
1076
}
1077

1078
impl Mul<&USizeVec3> for &usize {
1079
    type Output = USizeVec3;
1080
    #[inline]
1081
    fn mul(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1082
        (*self).mul(*rhs)
4✔
1083
    }
4✔
1084
}
1085

1086
impl Mul<USizeVec3> for &usize {
1087
    type Output = USizeVec3;
1088
    #[inline]
1089
    fn mul(self, rhs: USizeVec3) -> USizeVec3 {
4✔
1090
        (*self).mul(rhs)
4✔
1091
    }
4✔
1092
}
1093

1094
impl Add for USizeVec3 {
1095
    type Output = Self;
1096
    #[inline]
1097
    fn add(self, rhs: Self) -> Self {
56✔
1098
        Self {
56✔
1099
            x: self.x.add(rhs.x),
56✔
1100
            y: self.y.add(rhs.y),
56✔
1101
            z: self.z.add(rhs.z),
56✔
1102
        }
56✔
1103
    }
56✔
1104
}
1105

1106
impl Add<&Self> for USizeVec3 {
1107
    type Output = Self;
1108
    #[inline]
1109
    fn add(self, rhs: &Self) -> Self {
4✔
1110
        self.add(*rhs)
4✔
1111
    }
4✔
1112
}
1113

1114
impl Add<&USizeVec3> for &USizeVec3 {
1115
    type Output = USizeVec3;
1116
    #[inline]
1117
    fn add(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1118
        (*self).add(*rhs)
4✔
1119
    }
4✔
1120
}
1121

1122
impl Add<USizeVec3> for &USizeVec3 {
1123
    type Output = USizeVec3;
1124
    #[inline]
1125
    fn add(self, rhs: USizeVec3) -> USizeVec3 {
4✔
1126
        (*self).add(rhs)
4✔
1127
    }
4✔
1128
}
1129

1130
impl AddAssign for USizeVec3 {
1131
    #[inline]
1132
    fn add_assign(&mut self, rhs: Self) {
12✔
1133
        self.x.add_assign(rhs.x);
12✔
1134
        self.y.add_assign(rhs.y);
12✔
1135
        self.z.add_assign(rhs.z);
12✔
1136
    }
12✔
1137
}
1138

1139
impl AddAssign<&Self> for USizeVec3 {
1140
    #[inline]
1141
    fn add_assign(&mut self, rhs: &Self) {
4✔
1142
        self.add_assign(*rhs);
4✔
1143
    }
4✔
1144
}
1145

1146
impl Add<usize> for USizeVec3 {
1147
    type Output = Self;
1148
    #[inline]
1149
    fn add(self, rhs: usize) -> Self {
28✔
1150
        Self {
28✔
1151
            x: self.x.add(rhs),
28✔
1152
            y: self.y.add(rhs),
28✔
1153
            z: self.z.add(rhs),
28✔
1154
        }
28✔
1155
    }
28✔
1156
}
1157

1158
impl Add<&usize> for USizeVec3 {
1159
    type Output = Self;
1160
    #[inline]
1161
    fn add(self, rhs: &usize) -> Self {
4✔
1162
        self.add(*rhs)
4✔
1163
    }
4✔
1164
}
1165

1166
impl Add<&usize> for &USizeVec3 {
1167
    type Output = USizeVec3;
1168
    #[inline]
1169
    fn add(self, rhs: &usize) -> USizeVec3 {
4✔
1170
        (*self).add(*rhs)
4✔
1171
    }
4✔
1172
}
1173

1174
impl Add<usize> for &USizeVec3 {
1175
    type Output = USizeVec3;
1176
    #[inline]
1177
    fn add(self, rhs: usize) -> USizeVec3 {
4✔
1178
        (*self).add(rhs)
4✔
1179
    }
4✔
1180
}
1181

1182
impl AddAssign<usize> for USizeVec3 {
1183
    #[inline]
1184
    fn add_assign(&mut self, rhs: usize) {
12✔
1185
        self.x.add_assign(rhs);
12✔
1186
        self.y.add_assign(rhs);
12✔
1187
        self.z.add_assign(rhs);
12✔
1188
    }
12✔
1189
}
1190

1191
impl AddAssign<&usize> for USizeVec3 {
1192
    #[inline]
1193
    fn add_assign(&mut self, rhs: &usize) {
4✔
1194
        self.add_assign(*rhs);
4✔
1195
    }
4✔
1196
}
1197

1198
impl Add<USizeVec3> for usize {
1199
    type Output = USizeVec3;
1200
    #[inline]
1201
    fn add(self, rhs: USizeVec3) -> USizeVec3 {
28✔
1202
        USizeVec3 {
28✔
1203
            x: self.add(rhs.x),
28✔
1204
            y: self.add(rhs.y),
28✔
1205
            z: self.add(rhs.z),
28✔
1206
        }
28✔
1207
    }
28✔
1208
}
1209

1210
impl Add<&USizeVec3> for usize {
1211
    type Output = USizeVec3;
1212
    #[inline]
1213
    fn add(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1214
        self.add(*rhs)
4✔
1215
    }
4✔
1216
}
1217

1218
impl Add<&USizeVec3> for &usize {
1219
    type Output = USizeVec3;
1220
    #[inline]
1221
    fn add(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1222
        (*self).add(*rhs)
4✔
1223
    }
4✔
1224
}
1225

1226
impl Add<USizeVec3> for &usize {
1227
    type Output = USizeVec3;
1228
    #[inline]
1229
    fn add(self, rhs: USizeVec3) -> USizeVec3 {
4✔
1230
        (*self).add(rhs)
4✔
1231
    }
4✔
1232
}
1233

1234
impl Sub for USizeVec3 {
1235
    type Output = Self;
1236
    #[inline]
1237
    fn sub(self, rhs: Self) -> Self {
28✔
1238
        Self {
28✔
1239
            x: self.x.sub(rhs.x),
28✔
1240
            y: self.y.sub(rhs.y),
28✔
1241
            z: self.z.sub(rhs.z),
28✔
1242
        }
28✔
1243
    }
28✔
1244
}
1245

1246
impl Sub<&Self> for USizeVec3 {
1247
    type Output = Self;
1248
    #[inline]
1249
    fn sub(self, rhs: &Self) -> Self {
4✔
1250
        self.sub(*rhs)
4✔
1251
    }
4✔
1252
}
1253

1254
impl Sub<&USizeVec3> for &USizeVec3 {
1255
    type Output = USizeVec3;
1256
    #[inline]
1257
    fn sub(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1258
        (*self).sub(*rhs)
4✔
1259
    }
4✔
1260
}
1261

1262
impl Sub<USizeVec3> for &USizeVec3 {
1263
    type Output = USizeVec3;
1264
    #[inline]
1265
    fn sub(self, rhs: USizeVec3) -> USizeVec3 {
4✔
1266
        (*self).sub(rhs)
4✔
1267
    }
4✔
1268
}
1269

1270
impl SubAssign for USizeVec3 {
1271
    #[inline]
1272
    fn sub_assign(&mut self, rhs: Self) {
12✔
1273
        self.x.sub_assign(rhs.x);
12✔
1274
        self.y.sub_assign(rhs.y);
12✔
1275
        self.z.sub_assign(rhs.z);
12✔
1276
    }
12✔
1277
}
1278

1279
impl SubAssign<&Self> for USizeVec3 {
1280
    #[inline]
1281
    fn sub_assign(&mut self, rhs: &Self) {
4✔
1282
        self.sub_assign(*rhs);
4✔
1283
    }
4✔
1284
}
1285

1286
impl Sub<usize> for USizeVec3 {
1287
    type Output = Self;
1288
    #[inline]
1289
    fn sub(self, rhs: usize) -> Self {
28✔
1290
        Self {
28✔
1291
            x: self.x.sub(rhs),
28✔
1292
            y: self.y.sub(rhs),
28✔
1293
            z: self.z.sub(rhs),
28✔
1294
        }
28✔
1295
    }
28✔
1296
}
1297

1298
impl Sub<&usize> for USizeVec3 {
1299
    type Output = Self;
1300
    #[inline]
1301
    fn sub(self, rhs: &usize) -> Self {
4✔
1302
        self.sub(*rhs)
4✔
1303
    }
4✔
1304
}
1305

1306
impl Sub<&usize> for &USizeVec3 {
1307
    type Output = USizeVec3;
1308
    #[inline]
1309
    fn sub(self, rhs: &usize) -> USizeVec3 {
4✔
1310
        (*self).sub(*rhs)
4✔
1311
    }
4✔
1312
}
1313

1314
impl Sub<usize> for &USizeVec3 {
1315
    type Output = USizeVec3;
1316
    #[inline]
1317
    fn sub(self, rhs: usize) -> USizeVec3 {
4✔
1318
        (*self).sub(rhs)
4✔
1319
    }
4✔
1320
}
1321

1322
impl SubAssign<usize> for USizeVec3 {
1323
    #[inline]
1324
    fn sub_assign(&mut self, rhs: usize) {
12✔
1325
        self.x.sub_assign(rhs);
12✔
1326
        self.y.sub_assign(rhs);
12✔
1327
        self.z.sub_assign(rhs);
12✔
1328
    }
12✔
1329
}
1330

1331
impl SubAssign<&usize> for USizeVec3 {
1332
    #[inline]
1333
    fn sub_assign(&mut self, rhs: &usize) {
4✔
1334
        self.sub_assign(*rhs);
4✔
1335
    }
4✔
1336
}
1337

1338
impl Sub<USizeVec3> for usize {
1339
    type Output = USizeVec3;
1340
    #[inline]
1341
    fn sub(self, rhs: USizeVec3) -> USizeVec3 {
28✔
1342
        USizeVec3 {
28✔
1343
            x: self.sub(rhs.x),
28✔
1344
            y: self.sub(rhs.y),
28✔
1345
            z: self.sub(rhs.z),
28✔
1346
        }
28✔
1347
    }
28✔
1348
}
1349

1350
impl Sub<&USizeVec3> for usize {
1351
    type Output = USizeVec3;
1352
    #[inline]
1353
    fn sub(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1354
        self.sub(*rhs)
4✔
1355
    }
4✔
1356
}
1357

1358
impl Sub<&USizeVec3> for &usize {
1359
    type Output = USizeVec3;
1360
    #[inline]
1361
    fn sub(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1362
        (*self).sub(*rhs)
4✔
1363
    }
4✔
1364
}
1365

1366
impl Sub<USizeVec3> for &usize {
1367
    type Output = USizeVec3;
1368
    #[inline]
1369
    fn sub(self, rhs: USizeVec3) -> USizeVec3 {
4✔
1370
        (*self).sub(rhs)
4✔
1371
    }
4✔
1372
}
1373

1374
impl Rem for USizeVec3 {
1375
    type Output = Self;
1376
    #[inline]
1377
    fn rem(self, rhs: Self) -> Self {
32✔
1378
        Self {
32✔
1379
            x: self.x.rem(rhs.x),
32✔
1380
            y: self.y.rem(rhs.y),
32✔
1381
            z: self.z.rem(rhs.z),
32✔
1382
        }
32✔
1383
    }
32✔
1384
}
1385

1386
impl Rem<&Self> for USizeVec3 {
1387
    type Output = Self;
1388
    #[inline]
1389
    fn rem(self, rhs: &Self) -> Self {
4✔
1390
        self.rem(*rhs)
4✔
1391
    }
4✔
1392
}
1393

1394
impl Rem<&USizeVec3> for &USizeVec3 {
1395
    type Output = USizeVec3;
1396
    #[inline]
1397
    fn rem(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1398
        (*self).rem(*rhs)
4✔
1399
    }
4✔
1400
}
1401

1402
impl Rem<USizeVec3> for &USizeVec3 {
1403
    type Output = USizeVec3;
1404
    #[inline]
1405
    fn rem(self, rhs: USizeVec3) -> USizeVec3 {
4✔
1406
        (*self).rem(rhs)
4✔
1407
    }
4✔
1408
}
1409

1410
impl RemAssign for USizeVec3 {
1411
    #[inline]
1412
    fn rem_assign(&mut self, rhs: Self) {
16✔
1413
        self.x.rem_assign(rhs.x);
16✔
1414
        self.y.rem_assign(rhs.y);
16✔
1415
        self.z.rem_assign(rhs.z);
16✔
1416
    }
16✔
1417
}
1418

1419
impl RemAssign<&Self> for USizeVec3 {
1420
    #[inline]
1421
    fn rem_assign(&mut self, rhs: &Self) {
4✔
1422
        self.rem_assign(*rhs);
4✔
1423
    }
4✔
1424
}
1425

1426
impl Rem<usize> for USizeVec3 {
1427
    type Output = Self;
1428
    #[inline]
1429
    fn rem(self, rhs: usize) -> Self {
36✔
1430
        Self {
36✔
1431
            x: self.x.rem(rhs),
36✔
1432
            y: self.y.rem(rhs),
36✔
1433
            z: self.z.rem(rhs),
36✔
1434
        }
36✔
1435
    }
36✔
1436
}
1437

1438
impl Rem<&usize> for USizeVec3 {
1439
    type Output = Self;
1440
    #[inline]
1441
    fn rem(self, rhs: &usize) -> Self {
4✔
1442
        self.rem(*rhs)
4✔
1443
    }
4✔
1444
}
1445

1446
impl Rem<&usize> for &USizeVec3 {
1447
    type Output = USizeVec3;
1448
    #[inline]
1449
    fn rem(self, rhs: &usize) -> USizeVec3 {
4✔
1450
        (*self).rem(*rhs)
4✔
1451
    }
4✔
1452
}
1453

1454
impl Rem<usize> for &USizeVec3 {
1455
    type Output = USizeVec3;
1456
    #[inline]
1457
    fn rem(self, rhs: usize) -> USizeVec3 {
4✔
1458
        (*self).rem(rhs)
4✔
1459
    }
4✔
1460
}
1461

1462
impl RemAssign<usize> for USizeVec3 {
1463
    #[inline]
1464
    fn rem_assign(&mut self, rhs: usize) {
12✔
1465
        self.x.rem_assign(rhs);
12✔
1466
        self.y.rem_assign(rhs);
12✔
1467
        self.z.rem_assign(rhs);
12✔
1468
    }
12✔
1469
}
1470

1471
impl RemAssign<&usize> for USizeVec3 {
1472
    #[inline]
1473
    fn rem_assign(&mut self, rhs: &usize) {
4✔
1474
        self.rem_assign(*rhs);
4✔
1475
    }
4✔
1476
}
1477

1478
impl Rem<USizeVec3> for usize {
1479
    type Output = USizeVec3;
1480
    #[inline]
1481
    fn rem(self, rhs: USizeVec3) -> USizeVec3 {
28✔
1482
        USizeVec3 {
28✔
1483
            x: self.rem(rhs.x),
28✔
1484
            y: self.rem(rhs.y),
28✔
1485
            z: self.rem(rhs.z),
28✔
1486
        }
28✔
1487
    }
28✔
1488
}
1489

1490
impl Rem<&USizeVec3> for usize {
1491
    type Output = USizeVec3;
1492
    #[inline]
1493
    fn rem(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1494
        self.rem(*rhs)
4✔
1495
    }
4✔
1496
}
1497

1498
impl Rem<&USizeVec3> for &usize {
1499
    type Output = USizeVec3;
1500
    #[inline]
1501
    fn rem(self, rhs: &USizeVec3) -> USizeVec3 {
4✔
1502
        (*self).rem(*rhs)
4✔
1503
    }
4✔
1504
}
1505

1506
impl Rem<USizeVec3> for &usize {
1507
    type Output = USizeVec3;
1508
    #[inline]
1509
    fn rem(self, rhs: USizeVec3) -> USizeVec3 {
4✔
1510
        (*self).rem(rhs)
4✔
1511
    }
4✔
1512
}
1513

1514
impl AsRef<[usize; 3]> for USizeVec3 {
1515
    #[inline]
1516
    fn as_ref(&self) -> &[usize; 3] {
16✔
1517
        unsafe { &*(self as *const Self as *const [usize; 3]) }
16✔
1518
    }
16✔
1519
}
1520

1521
impl AsMut<[usize; 3]> for USizeVec3 {
1522
    #[inline]
1523
    fn as_mut(&mut self) -> &mut [usize; 3] {
4✔
1524
        unsafe { &mut *(self as *mut Self as *mut [usize; 3]) }
4✔
1525
    }
4✔
1526
}
1527

1528
impl Sum for USizeVec3 {
1529
    #[inline]
1530
    fn sum<I>(iter: I) -> Self
4✔
1531
    where
4✔
1532
        I: Iterator<Item = Self>,
4✔
1533
    {
1534
        iter.fold(Self::ZERO, Self::add)
4✔
1535
    }
4✔
1536
}
1537

1538
impl<'a> Sum<&'a Self> for USizeVec3 {
1539
    #[inline]
1540
    fn sum<I>(iter: I) -> Self
4✔
1541
    where
4✔
1542
        I: Iterator<Item = &'a Self>,
4✔
1543
    {
1544
        iter.fold(Self::ZERO, |a, &b| Self::add(a, b))
8✔
1545
    }
4✔
1546
}
1547

1548
impl Product for USizeVec3 {
1549
    #[inline]
1550
    fn product<I>(iter: I) -> Self
4✔
1551
    where
4✔
1552
        I: Iterator<Item = Self>,
4✔
1553
    {
1554
        iter.fold(Self::ONE, Self::mul)
4✔
1555
    }
4✔
1556
}
1557

1558
impl<'a> Product<&'a Self> for USizeVec3 {
1559
    #[inline]
1560
    fn product<I>(iter: I) -> Self
4✔
1561
    where
4✔
1562
        I: Iterator<Item = &'a Self>,
4✔
1563
    {
1564
        iter.fold(Self::ONE, |a, &b| Self::mul(a, b))
8✔
1565
    }
4✔
1566
}
1567

1568
impl Not for USizeVec3 {
1569
    type Output = Self;
1570
    #[inline]
1571
    fn not(self) -> Self {
64✔
1572
        Self {
64✔
1573
            x: self.x.not(),
64✔
1574
            y: self.y.not(),
64✔
1575
            z: self.z.not(),
64✔
1576
        }
64✔
1577
    }
64✔
1578
}
1579

1580
impl Not for &USizeVec3 {
1581
    type Output = USizeVec3;
1582
    #[inline]
1583
    fn not(self) -> USizeVec3 {
32✔
1584
        (*self).not()
32✔
1585
    }
32✔
1586
}
1587

1588
impl BitAnd for USizeVec3 {
1589
    type Output = Self;
1590
    #[inline]
1591
    fn bitand(self, rhs: Self) -> Self::Output {
2,048✔
1592
        Self {
2,048✔
1593
            x: self.x.bitand(rhs.x),
2,048✔
1594
            y: self.y.bitand(rhs.y),
2,048✔
1595
            z: self.z.bitand(rhs.z),
2,048✔
1596
        }
2,048✔
1597
    }
2,048✔
1598
}
1599

1600
impl BitAnd<&Self> for USizeVec3 {
1601
    type Output = Self;
1602
    #[inline]
1603
    fn bitand(self, rhs: &Self) -> Self {
256✔
1604
        self.bitand(*rhs)
256✔
1605
    }
256✔
1606
}
1607

1608
impl BitAnd<&USizeVec3> for &USizeVec3 {
1609
    type Output = USizeVec3;
1610
    #[inline]
1611
    fn bitand(self, rhs: &USizeVec3) -> USizeVec3 {
256✔
1612
        (*self).bitand(*rhs)
256✔
1613
    }
256✔
1614
}
1615

1616
impl BitAnd<USizeVec3> for &USizeVec3 {
1617
    type Output = USizeVec3;
1618
    #[inline]
1619
    fn bitand(self, rhs: USizeVec3) -> USizeVec3 {
256✔
1620
        (*self).bitand(rhs)
256✔
1621
    }
256✔
1622
}
1623

1624
impl BitAndAssign for USizeVec3 {
1625
    #[inline]
1626
    fn bitand_assign(&mut self, rhs: Self) {
512✔
1627
        *self = self.bitand(rhs);
512✔
1628
    }
512✔
1629
}
1630

1631
impl BitAndAssign<&Self> for USizeVec3 {
1632
    #[inline]
1633
    fn bitand_assign(&mut self, rhs: &Self) {
256✔
1634
        self.bitand_assign(*rhs);
256✔
1635
    }
256✔
1636
}
1637

1638
impl BitOr for USizeVec3 {
1639
    type Output = Self;
1640
    #[inline]
1641
    fn bitor(self, rhs: Self) -> Self::Output {
2,048✔
1642
        Self {
2,048✔
1643
            x: self.x.bitor(rhs.x),
2,048✔
1644
            y: self.y.bitor(rhs.y),
2,048✔
1645
            z: self.z.bitor(rhs.z),
2,048✔
1646
        }
2,048✔
1647
    }
2,048✔
1648
}
1649

1650
impl BitOr<&Self> for USizeVec3 {
1651
    type Output = Self;
1652
    #[inline]
1653
    fn bitor(self, rhs: &Self) -> Self {
256✔
1654
        self.bitor(*rhs)
256✔
1655
    }
256✔
1656
}
1657

1658
impl BitOr<&USizeVec3> for &USizeVec3 {
1659
    type Output = USizeVec3;
1660
    #[inline]
1661
    fn bitor(self, rhs: &USizeVec3) -> USizeVec3 {
256✔
1662
        (*self).bitor(*rhs)
256✔
1663
    }
256✔
1664
}
1665

1666
impl BitOr<USizeVec3> for &USizeVec3 {
1667
    type Output = USizeVec3;
1668
    #[inline]
1669
    fn bitor(self, rhs: USizeVec3) -> USizeVec3 {
256✔
1670
        (*self).bitor(rhs)
256✔
1671
    }
256✔
1672
}
1673

1674
impl BitOrAssign for USizeVec3 {
1675
    #[inline]
1676
    fn bitor_assign(&mut self, rhs: Self) {
512✔
1677
        *self = self.bitor(rhs);
512✔
1678
    }
512✔
1679
}
1680

1681
impl BitOrAssign<&Self> for USizeVec3 {
1682
    #[inline]
1683
    fn bitor_assign(&mut self, rhs: &Self) {
256✔
1684
        self.bitor_assign(*rhs);
256✔
1685
    }
256✔
1686
}
1687

1688
impl BitXor for USizeVec3 {
1689
    type Output = Self;
1690
    #[inline]
1691
    fn bitxor(self, rhs: Self) -> Self::Output {
2,048✔
1692
        Self {
2,048✔
1693
            x: self.x.bitxor(rhs.x),
2,048✔
1694
            y: self.y.bitxor(rhs.y),
2,048✔
1695
            z: self.z.bitxor(rhs.z),
2,048✔
1696
        }
2,048✔
1697
    }
2,048✔
1698
}
1699

1700
impl BitXor<&Self> for USizeVec3 {
1701
    type Output = Self;
1702
    #[inline]
1703
    fn bitxor(self, rhs: &Self) -> Self {
256✔
1704
        self.bitxor(*rhs)
256✔
1705
    }
256✔
1706
}
1707

1708
impl BitXor<&USizeVec3> for &USizeVec3 {
1709
    type Output = USizeVec3;
1710
    #[inline]
1711
    fn bitxor(self, rhs: &USizeVec3) -> USizeVec3 {
256✔
1712
        (*self).bitxor(*rhs)
256✔
1713
    }
256✔
1714
}
1715

1716
impl BitXor<USizeVec3> for &USizeVec3 {
1717
    type Output = USizeVec3;
1718
    #[inline]
1719
    fn bitxor(self, rhs: USizeVec3) -> USizeVec3 {
256✔
1720
        (*self).bitxor(rhs)
256✔
1721
    }
256✔
1722
}
1723

1724
impl BitXorAssign for USizeVec3 {
1725
    #[inline]
1726
    fn bitxor_assign(&mut self, rhs: Self) {
512✔
1727
        *self = self.bitxor(rhs);
512✔
1728
    }
512✔
1729
}
1730

1731
impl BitXorAssign<&Self> for USizeVec3 {
1732
    #[inline]
1733
    fn bitxor_assign(&mut self, rhs: &Self) {
256✔
1734
        self.bitxor_assign(*rhs);
256✔
1735
    }
256✔
1736
}
1737

1738
impl BitAnd<usize> for USizeVec3 {
1739
    type Output = Self;
1740
    #[inline]
1741
    fn bitand(self, rhs: usize) -> Self::Output {
512✔
1742
        Self {
512✔
1743
            x: self.x.bitand(rhs),
512✔
1744
            y: self.y.bitand(rhs),
512✔
1745
            z: self.z.bitand(rhs),
512✔
1746
        }
512✔
1747
    }
512✔
1748
}
1749

1750
impl BitAnd<&usize> for USizeVec3 {
1751
    type Output = Self;
1752
    #[inline]
1753
    fn bitand(self, rhs: &usize) -> Self {
64✔
1754
        self.bitand(*rhs)
64✔
1755
    }
64✔
1756
}
1757

1758
impl BitAnd<&usize> for &USizeVec3 {
1759
    type Output = USizeVec3;
1760
    #[inline]
1761
    fn bitand(self, rhs: &usize) -> USizeVec3 {
64✔
1762
        (*self).bitand(*rhs)
64✔
1763
    }
64✔
1764
}
1765

1766
impl BitAnd<usize> for &USizeVec3 {
1767
    type Output = USizeVec3;
1768
    #[inline]
1769
    fn bitand(self, rhs: usize) -> USizeVec3 {
64✔
1770
        (*self).bitand(rhs)
64✔
1771
    }
64✔
1772
}
1773

1774
impl BitAndAssign<usize> for USizeVec3 {
1775
    #[inline]
1776
    fn bitand_assign(&mut self, rhs: usize) {
128✔
1777
        *self = self.bitand(rhs);
128✔
1778
    }
128✔
1779
}
1780

1781
impl BitAndAssign<&usize> for USizeVec3 {
1782
    #[inline]
1783
    fn bitand_assign(&mut self, rhs: &usize) {
64✔
1784
        self.bitand_assign(*rhs);
64✔
1785
    }
64✔
1786
}
1787

1788
impl BitOr<usize> for USizeVec3 {
1789
    type Output = Self;
1790
    #[inline]
1791
    fn bitor(self, rhs: usize) -> Self::Output {
512✔
1792
        Self {
512✔
1793
            x: self.x.bitor(rhs),
512✔
1794
            y: self.y.bitor(rhs),
512✔
1795
            z: self.z.bitor(rhs),
512✔
1796
        }
512✔
1797
    }
512✔
1798
}
1799

1800
impl BitOr<&usize> for USizeVec3 {
1801
    type Output = Self;
1802
    #[inline]
1803
    fn bitor(self, rhs: &usize) -> Self {
64✔
1804
        self.bitor(*rhs)
64✔
1805
    }
64✔
1806
}
1807

1808
impl BitOr<&usize> for &USizeVec3 {
1809
    type Output = USizeVec3;
1810
    #[inline]
1811
    fn bitor(self, rhs: &usize) -> USizeVec3 {
64✔
1812
        (*self).bitor(*rhs)
64✔
1813
    }
64✔
1814
}
1815

1816
impl BitOr<usize> for &USizeVec3 {
1817
    type Output = USizeVec3;
1818
    #[inline]
1819
    fn bitor(self, rhs: usize) -> USizeVec3 {
64✔
1820
        (*self).bitor(rhs)
64✔
1821
    }
64✔
1822
}
1823

1824
impl BitOrAssign<usize> for USizeVec3 {
1825
    #[inline]
1826
    fn bitor_assign(&mut self, rhs: usize) {
128✔
1827
        *self = self.bitor(rhs);
128✔
1828
    }
128✔
1829
}
1830

1831
impl BitOrAssign<&usize> for USizeVec3 {
1832
    #[inline]
1833
    fn bitor_assign(&mut self, rhs: &usize) {
64✔
1834
        self.bitor_assign(*rhs);
64✔
1835
    }
64✔
1836
}
1837

1838
impl BitXor<usize> for USizeVec3 {
1839
    type Output = Self;
1840
    #[inline]
1841
    fn bitxor(self, rhs: usize) -> Self::Output {
512✔
1842
        Self {
512✔
1843
            x: self.x.bitxor(rhs),
512✔
1844
            y: self.y.bitxor(rhs),
512✔
1845
            z: self.z.bitxor(rhs),
512✔
1846
        }
512✔
1847
    }
512✔
1848
}
1849

1850
impl BitXor<&usize> for USizeVec3 {
1851
    type Output = Self;
1852
    #[inline]
1853
    fn bitxor(self, rhs: &usize) -> Self {
64✔
1854
        self.bitxor(*rhs)
64✔
1855
    }
64✔
1856
}
1857

1858
impl BitXor<&usize> for &USizeVec3 {
1859
    type Output = USizeVec3;
1860
    #[inline]
1861
    fn bitxor(self, rhs: &usize) -> USizeVec3 {
64✔
1862
        (*self).bitxor(*rhs)
64✔
1863
    }
64✔
1864
}
1865

1866
impl BitXor<usize> for &USizeVec3 {
1867
    type Output = USizeVec3;
1868
    #[inline]
1869
    fn bitxor(self, rhs: usize) -> USizeVec3 {
64✔
1870
        (*self).bitxor(rhs)
64✔
1871
    }
64✔
1872
}
1873

1874
impl BitXorAssign<usize> for USizeVec3 {
1875
    #[inline]
1876
    fn bitxor_assign(&mut self, rhs: usize) {
128✔
1877
        *self = self.bitxor(rhs);
128✔
1878
    }
128✔
1879
}
1880

1881
impl BitXorAssign<&usize> for USizeVec3 {
1882
    #[inline]
1883
    fn bitxor_assign(&mut self, rhs: &usize) {
64✔
1884
        self.bitxor_assign(*rhs);
64✔
1885
    }
64✔
1886
}
1887

1888
impl Shl<i8> for USizeVec3 {
1889
    type Output = Self;
1890
    #[inline]
1891
    fn shl(self, rhs: i8) -> Self::Output {
512✔
1892
        Self {
512✔
1893
            x: self.x.shl(rhs),
512✔
1894
            y: self.y.shl(rhs),
512✔
1895
            z: self.z.shl(rhs),
512✔
1896
        }
512✔
1897
    }
512✔
1898
}
1899

1900
impl Shl<&i8> for USizeVec3 {
1901
    type Output = Self;
1902
    #[inline]
1903
    fn shl(self, rhs: &i8) -> Self {
64✔
1904
        self.shl(*rhs)
64✔
1905
    }
64✔
1906
}
1907

1908
impl Shl<&i8> for &USizeVec3 {
1909
    type Output = USizeVec3;
1910
    #[inline]
1911
    fn shl(self, rhs: &i8) -> USizeVec3 {
64✔
1912
        (*self).shl(*rhs)
64✔
1913
    }
64✔
1914
}
1915

1916
impl Shl<i8> for &USizeVec3 {
1917
    type Output = USizeVec3;
1918
    #[inline]
1919
    fn shl(self, rhs: i8) -> USizeVec3 {
64✔
1920
        (*self).shl(rhs)
64✔
1921
    }
64✔
1922
}
1923

1924
impl ShlAssign<i8> for USizeVec3 {
1925
    #[inline]
1926
    fn shl_assign(&mut self, rhs: i8) {
128✔
1927
        *self = self.shl(rhs);
128✔
1928
    }
128✔
1929
}
1930

1931
impl ShlAssign<&i8> for USizeVec3 {
1932
    #[inline]
1933
    fn shl_assign(&mut self, rhs: &i8) {
64✔
1934
        self.shl_assign(*rhs);
64✔
1935
    }
64✔
1936
}
1937

1938
impl Shr<i8> for USizeVec3 {
1939
    type Output = Self;
1940
    #[inline]
1941
    fn shr(self, rhs: i8) -> Self::Output {
512✔
1942
        Self {
512✔
1943
            x: self.x.shr(rhs),
512✔
1944
            y: self.y.shr(rhs),
512✔
1945
            z: self.z.shr(rhs),
512✔
1946
        }
512✔
1947
    }
512✔
1948
}
1949

1950
impl Shr<&i8> for USizeVec3 {
1951
    type Output = Self;
1952
    #[inline]
1953
    fn shr(self, rhs: &i8) -> Self {
64✔
1954
        self.shr(*rhs)
64✔
1955
    }
64✔
1956
}
1957

1958
impl Shr<&i8> for &USizeVec3 {
1959
    type Output = USizeVec3;
1960
    #[inline]
1961
    fn shr(self, rhs: &i8) -> USizeVec3 {
64✔
1962
        (*self).shr(*rhs)
64✔
1963
    }
64✔
1964
}
1965

1966
impl Shr<i8> for &USizeVec3 {
1967
    type Output = USizeVec3;
1968
    #[inline]
1969
    fn shr(self, rhs: i8) -> USizeVec3 {
64✔
1970
        (*self).shr(rhs)
64✔
1971
    }
64✔
1972
}
1973

1974
impl ShrAssign<i8> for USizeVec3 {
1975
    #[inline]
1976
    fn shr_assign(&mut self, rhs: i8) {
128✔
1977
        *self = self.shr(rhs);
128✔
1978
    }
128✔
1979
}
1980

1981
impl ShrAssign<&i8> for USizeVec3 {
1982
    #[inline]
1983
    fn shr_assign(&mut self, rhs: &i8) {
64✔
1984
        self.shr_assign(*rhs);
64✔
1985
    }
64✔
1986
}
1987

1988
impl Shl<i16> for USizeVec3 {
1989
    type Output = Self;
1990
    #[inline]
1991
    fn shl(self, rhs: i16) -> Self::Output {
512✔
1992
        Self {
512✔
1993
            x: self.x.shl(rhs),
512✔
1994
            y: self.y.shl(rhs),
512✔
1995
            z: self.z.shl(rhs),
512✔
1996
        }
512✔
1997
    }
512✔
1998
}
1999

2000
impl Shl<&i16> for USizeVec3 {
2001
    type Output = Self;
2002
    #[inline]
2003
    fn shl(self, rhs: &i16) -> Self {
64✔
2004
        self.shl(*rhs)
64✔
2005
    }
64✔
2006
}
2007

2008
impl Shl<&i16> for &USizeVec3 {
2009
    type Output = USizeVec3;
2010
    #[inline]
2011
    fn shl(self, rhs: &i16) -> USizeVec3 {
64✔
2012
        (*self).shl(*rhs)
64✔
2013
    }
64✔
2014
}
2015

2016
impl Shl<i16> for &USizeVec3 {
2017
    type Output = USizeVec3;
2018
    #[inline]
2019
    fn shl(self, rhs: i16) -> USizeVec3 {
64✔
2020
        (*self).shl(rhs)
64✔
2021
    }
64✔
2022
}
2023

2024
impl ShlAssign<i16> for USizeVec3 {
2025
    #[inline]
2026
    fn shl_assign(&mut self, rhs: i16) {
128✔
2027
        *self = self.shl(rhs);
128✔
2028
    }
128✔
2029
}
2030

2031
impl ShlAssign<&i16> for USizeVec3 {
2032
    #[inline]
2033
    fn shl_assign(&mut self, rhs: &i16) {
64✔
2034
        self.shl_assign(*rhs);
64✔
2035
    }
64✔
2036
}
2037

2038
impl Shr<i16> for USizeVec3 {
2039
    type Output = Self;
2040
    #[inline]
2041
    fn shr(self, rhs: i16) -> Self::Output {
512✔
2042
        Self {
512✔
2043
            x: self.x.shr(rhs),
512✔
2044
            y: self.y.shr(rhs),
512✔
2045
            z: self.z.shr(rhs),
512✔
2046
        }
512✔
2047
    }
512✔
2048
}
2049

2050
impl Shr<&i16> for USizeVec3 {
2051
    type Output = Self;
2052
    #[inline]
2053
    fn shr(self, rhs: &i16) -> Self {
64✔
2054
        self.shr(*rhs)
64✔
2055
    }
64✔
2056
}
2057

2058
impl Shr<&i16> for &USizeVec3 {
2059
    type Output = USizeVec3;
2060
    #[inline]
2061
    fn shr(self, rhs: &i16) -> USizeVec3 {
64✔
2062
        (*self).shr(*rhs)
64✔
2063
    }
64✔
2064
}
2065

2066
impl Shr<i16> for &USizeVec3 {
2067
    type Output = USizeVec3;
2068
    #[inline]
2069
    fn shr(self, rhs: i16) -> USizeVec3 {
64✔
2070
        (*self).shr(rhs)
64✔
2071
    }
64✔
2072
}
2073

2074
impl ShrAssign<i16> for USizeVec3 {
2075
    #[inline]
2076
    fn shr_assign(&mut self, rhs: i16) {
128✔
2077
        *self = self.shr(rhs);
128✔
2078
    }
128✔
2079
}
2080

2081
impl ShrAssign<&i16> for USizeVec3 {
2082
    #[inline]
2083
    fn shr_assign(&mut self, rhs: &i16) {
64✔
2084
        self.shr_assign(*rhs);
64✔
2085
    }
64✔
2086
}
2087

2088
impl Shl<i32> for USizeVec3 {
2089
    type Output = Self;
2090
    #[inline]
2091
    fn shl(self, rhs: i32) -> Self::Output {
512✔
2092
        Self {
512✔
2093
            x: self.x.shl(rhs),
512✔
2094
            y: self.y.shl(rhs),
512✔
2095
            z: self.z.shl(rhs),
512✔
2096
        }
512✔
2097
    }
512✔
2098
}
2099

2100
impl Shl<&i32> for USizeVec3 {
2101
    type Output = Self;
2102
    #[inline]
2103
    fn shl(self, rhs: &i32) -> Self {
64✔
2104
        self.shl(*rhs)
64✔
2105
    }
64✔
2106
}
2107

2108
impl Shl<&i32> for &USizeVec3 {
2109
    type Output = USizeVec3;
2110
    #[inline]
2111
    fn shl(self, rhs: &i32) -> USizeVec3 {
64✔
2112
        (*self).shl(*rhs)
64✔
2113
    }
64✔
2114
}
2115

2116
impl Shl<i32> for &USizeVec3 {
2117
    type Output = USizeVec3;
2118
    #[inline]
2119
    fn shl(self, rhs: i32) -> USizeVec3 {
64✔
2120
        (*self).shl(rhs)
64✔
2121
    }
64✔
2122
}
2123

2124
impl ShlAssign<i32> for USizeVec3 {
2125
    #[inline]
2126
    fn shl_assign(&mut self, rhs: i32) {
128✔
2127
        *self = self.shl(rhs);
128✔
2128
    }
128✔
2129
}
2130

2131
impl ShlAssign<&i32> for USizeVec3 {
2132
    #[inline]
2133
    fn shl_assign(&mut self, rhs: &i32) {
64✔
2134
        self.shl_assign(*rhs);
64✔
2135
    }
64✔
2136
}
2137

2138
impl Shr<i32> for USizeVec3 {
2139
    type Output = Self;
2140
    #[inline]
2141
    fn shr(self, rhs: i32) -> Self::Output {
512✔
2142
        Self {
512✔
2143
            x: self.x.shr(rhs),
512✔
2144
            y: self.y.shr(rhs),
512✔
2145
            z: self.z.shr(rhs),
512✔
2146
        }
512✔
2147
    }
512✔
2148
}
2149

2150
impl Shr<&i32> for USizeVec3 {
2151
    type Output = Self;
2152
    #[inline]
2153
    fn shr(self, rhs: &i32) -> Self {
64✔
2154
        self.shr(*rhs)
64✔
2155
    }
64✔
2156
}
2157

2158
impl Shr<&i32> for &USizeVec3 {
2159
    type Output = USizeVec3;
2160
    #[inline]
2161
    fn shr(self, rhs: &i32) -> USizeVec3 {
64✔
2162
        (*self).shr(*rhs)
64✔
2163
    }
64✔
2164
}
2165

2166
impl Shr<i32> for &USizeVec3 {
2167
    type Output = USizeVec3;
2168
    #[inline]
2169
    fn shr(self, rhs: i32) -> USizeVec3 {
64✔
2170
        (*self).shr(rhs)
64✔
2171
    }
64✔
2172
}
2173

2174
impl ShrAssign<i32> for USizeVec3 {
2175
    #[inline]
2176
    fn shr_assign(&mut self, rhs: i32) {
128✔
2177
        *self = self.shr(rhs);
128✔
2178
    }
128✔
2179
}
2180

2181
impl ShrAssign<&i32> for USizeVec3 {
2182
    #[inline]
2183
    fn shr_assign(&mut self, rhs: &i32) {
64✔
2184
        self.shr_assign(*rhs);
64✔
2185
    }
64✔
2186
}
2187

2188
impl Shl<i64> for USizeVec3 {
2189
    type Output = Self;
2190
    #[inline]
2191
    fn shl(self, rhs: i64) -> Self::Output {
512✔
2192
        Self {
512✔
2193
            x: self.x.shl(rhs),
512✔
2194
            y: self.y.shl(rhs),
512✔
2195
            z: self.z.shl(rhs),
512✔
2196
        }
512✔
2197
    }
512✔
2198
}
2199

2200
impl Shl<&i64> for USizeVec3 {
2201
    type Output = Self;
2202
    #[inline]
2203
    fn shl(self, rhs: &i64) -> Self {
64✔
2204
        self.shl(*rhs)
64✔
2205
    }
64✔
2206
}
2207

2208
impl Shl<&i64> for &USizeVec3 {
2209
    type Output = USizeVec3;
2210
    #[inline]
2211
    fn shl(self, rhs: &i64) -> USizeVec3 {
64✔
2212
        (*self).shl(*rhs)
64✔
2213
    }
64✔
2214
}
2215

2216
impl Shl<i64> for &USizeVec3 {
2217
    type Output = USizeVec3;
2218
    #[inline]
2219
    fn shl(self, rhs: i64) -> USizeVec3 {
64✔
2220
        (*self).shl(rhs)
64✔
2221
    }
64✔
2222
}
2223

2224
impl ShlAssign<i64> for USizeVec3 {
2225
    #[inline]
2226
    fn shl_assign(&mut self, rhs: i64) {
128✔
2227
        *self = self.shl(rhs);
128✔
2228
    }
128✔
2229
}
2230

2231
impl ShlAssign<&i64> for USizeVec3 {
2232
    #[inline]
2233
    fn shl_assign(&mut self, rhs: &i64) {
64✔
2234
        self.shl_assign(*rhs);
64✔
2235
    }
64✔
2236
}
2237

2238
impl Shr<i64> for USizeVec3 {
2239
    type Output = Self;
2240
    #[inline]
2241
    fn shr(self, rhs: i64) -> Self::Output {
512✔
2242
        Self {
512✔
2243
            x: self.x.shr(rhs),
512✔
2244
            y: self.y.shr(rhs),
512✔
2245
            z: self.z.shr(rhs),
512✔
2246
        }
512✔
2247
    }
512✔
2248
}
2249

2250
impl Shr<&i64> for USizeVec3 {
2251
    type Output = Self;
2252
    #[inline]
2253
    fn shr(self, rhs: &i64) -> Self {
64✔
2254
        self.shr(*rhs)
64✔
2255
    }
64✔
2256
}
2257

2258
impl Shr<&i64> for &USizeVec3 {
2259
    type Output = USizeVec3;
2260
    #[inline]
2261
    fn shr(self, rhs: &i64) -> USizeVec3 {
64✔
2262
        (*self).shr(*rhs)
64✔
2263
    }
64✔
2264
}
2265

2266
impl Shr<i64> for &USizeVec3 {
2267
    type Output = USizeVec3;
2268
    #[inline]
2269
    fn shr(self, rhs: i64) -> USizeVec3 {
64✔
2270
        (*self).shr(rhs)
64✔
2271
    }
64✔
2272
}
2273

2274
impl ShrAssign<i64> for USizeVec3 {
2275
    #[inline]
2276
    fn shr_assign(&mut self, rhs: i64) {
128✔
2277
        *self = self.shr(rhs);
128✔
2278
    }
128✔
2279
}
2280

2281
impl ShrAssign<&i64> for USizeVec3 {
2282
    #[inline]
2283
    fn shr_assign(&mut self, rhs: &i64) {
64✔
2284
        self.shr_assign(*rhs);
64✔
2285
    }
64✔
2286
}
2287

2288
impl Shl<u8> for USizeVec3 {
2289
    type Output = Self;
2290
    #[inline]
2291
    fn shl(self, rhs: u8) -> Self::Output {
512✔
2292
        Self {
512✔
2293
            x: self.x.shl(rhs),
512✔
2294
            y: self.y.shl(rhs),
512✔
2295
            z: self.z.shl(rhs),
512✔
2296
        }
512✔
2297
    }
512✔
2298
}
2299

2300
impl Shl<&u8> for USizeVec3 {
2301
    type Output = Self;
2302
    #[inline]
2303
    fn shl(self, rhs: &u8) -> Self {
64✔
2304
        self.shl(*rhs)
64✔
2305
    }
64✔
2306
}
2307

2308
impl Shl<&u8> for &USizeVec3 {
2309
    type Output = USizeVec3;
2310
    #[inline]
2311
    fn shl(self, rhs: &u8) -> USizeVec3 {
64✔
2312
        (*self).shl(*rhs)
64✔
2313
    }
64✔
2314
}
2315

2316
impl Shl<u8> for &USizeVec3 {
2317
    type Output = USizeVec3;
2318
    #[inline]
2319
    fn shl(self, rhs: u8) -> USizeVec3 {
64✔
2320
        (*self).shl(rhs)
64✔
2321
    }
64✔
2322
}
2323

2324
impl ShlAssign<u8> for USizeVec3 {
2325
    #[inline]
2326
    fn shl_assign(&mut self, rhs: u8) {
128✔
2327
        *self = self.shl(rhs);
128✔
2328
    }
128✔
2329
}
2330

2331
impl ShlAssign<&u8> for USizeVec3 {
2332
    #[inline]
2333
    fn shl_assign(&mut self, rhs: &u8) {
64✔
2334
        self.shl_assign(*rhs);
64✔
2335
    }
64✔
2336
}
2337

2338
impl Shr<u8> for USizeVec3 {
2339
    type Output = Self;
2340
    #[inline]
2341
    fn shr(self, rhs: u8) -> Self::Output {
512✔
2342
        Self {
512✔
2343
            x: self.x.shr(rhs),
512✔
2344
            y: self.y.shr(rhs),
512✔
2345
            z: self.z.shr(rhs),
512✔
2346
        }
512✔
2347
    }
512✔
2348
}
2349

2350
impl Shr<&u8> for USizeVec3 {
2351
    type Output = Self;
2352
    #[inline]
2353
    fn shr(self, rhs: &u8) -> Self {
64✔
2354
        self.shr(*rhs)
64✔
2355
    }
64✔
2356
}
2357

2358
impl Shr<&u8> for &USizeVec3 {
2359
    type Output = USizeVec3;
2360
    #[inline]
2361
    fn shr(self, rhs: &u8) -> USizeVec3 {
64✔
2362
        (*self).shr(*rhs)
64✔
2363
    }
64✔
2364
}
2365

2366
impl Shr<u8> for &USizeVec3 {
2367
    type Output = USizeVec3;
2368
    #[inline]
2369
    fn shr(self, rhs: u8) -> USizeVec3 {
64✔
2370
        (*self).shr(rhs)
64✔
2371
    }
64✔
2372
}
2373

2374
impl ShrAssign<u8> for USizeVec3 {
2375
    #[inline]
2376
    fn shr_assign(&mut self, rhs: u8) {
128✔
2377
        *self = self.shr(rhs);
128✔
2378
    }
128✔
2379
}
2380

2381
impl ShrAssign<&u8> for USizeVec3 {
2382
    #[inline]
2383
    fn shr_assign(&mut self, rhs: &u8) {
64✔
2384
        self.shr_assign(*rhs);
64✔
2385
    }
64✔
2386
}
2387

2388
impl Shl<u16> for USizeVec3 {
2389
    type Output = Self;
2390
    #[inline]
2391
    fn shl(self, rhs: u16) -> Self::Output {
512✔
2392
        Self {
512✔
2393
            x: self.x.shl(rhs),
512✔
2394
            y: self.y.shl(rhs),
512✔
2395
            z: self.z.shl(rhs),
512✔
2396
        }
512✔
2397
    }
512✔
2398
}
2399

2400
impl Shl<&u16> for USizeVec3 {
2401
    type Output = Self;
2402
    #[inline]
2403
    fn shl(self, rhs: &u16) -> Self {
64✔
2404
        self.shl(*rhs)
64✔
2405
    }
64✔
2406
}
2407

2408
impl Shl<&u16> for &USizeVec3 {
2409
    type Output = USizeVec3;
2410
    #[inline]
2411
    fn shl(self, rhs: &u16) -> USizeVec3 {
64✔
2412
        (*self).shl(*rhs)
64✔
2413
    }
64✔
2414
}
2415

2416
impl Shl<u16> for &USizeVec3 {
2417
    type Output = USizeVec3;
2418
    #[inline]
2419
    fn shl(self, rhs: u16) -> USizeVec3 {
64✔
2420
        (*self).shl(rhs)
64✔
2421
    }
64✔
2422
}
2423

2424
impl ShlAssign<u16> for USizeVec3 {
2425
    #[inline]
2426
    fn shl_assign(&mut self, rhs: u16) {
128✔
2427
        *self = self.shl(rhs);
128✔
2428
    }
128✔
2429
}
2430

2431
impl ShlAssign<&u16> for USizeVec3 {
2432
    #[inline]
2433
    fn shl_assign(&mut self, rhs: &u16) {
64✔
2434
        self.shl_assign(*rhs);
64✔
2435
    }
64✔
2436
}
2437

2438
impl Shr<u16> for USizeVec3 {
2439
    type Output = Self;
2440
    #[inline]
2441
    fn shr(self, rhs: u16) -> Self::Output {
512✔
2442
        Self {
512✔
2443
            x: self.x.shr(rhs),
512✔
2444
            y: self.y.shr(rhs),
512✔
2445
            z: self.z.shr(rhs),
512✔
2446
        }
512✔
2447
    }
512✔
2448
}
2449

2450
impl Shr<&u16> for USizeVec3 {
2451
    type Output = Self;
2452
    #[inline]
2453
    fn shr(self, rhs: &u16) -> Self {
64✔
2454
        self.shr(*rhs)
64✔
2455
    }
64✔
2456
}
2457

2458
impl Shr<&u16> for &USizeVec3 {
2459
    type Output = USizeVec3;
2460
    #[inline]
2461
    fn shr(self, rhs: &u16) -> USizeVec3 {
64✔
2462
        (*self).shr(*rhs)
64✔
2463
    }
64✔
2464
}
2465

2466
impl Shr<u16> for &USizeVec3 {
2467
    type Output = USizeVec3;
2468
    #[inline]
2469
    fn shr(self, rhs: u16) -> USizeVec3 {
64✔
2470
        (*self).shr(rhs)
64✔
2471
    }
64✔
2472
}
2473

2474
impl ShrAssign<u16> for USizeVec3 {
2475
    #[inline]
2476
    fn shr_assign(&mut self, rhs: u16) {
128✔
2477
        *self = self.shr(rhs);
128✔
2478
    }
128✔
2479
}
2480

2481
impl ShrAssign<&u16> for USizeVec3 {
2482
    #[inline]
2483
    fn shr_assign(&mut self, rhs: &u16) {
64✔
2484
        self.shr_assign(*rhs);
64✔
2485
    }
64✔
2486
}
2487

2488
impl Shl<u32> for USizeVec3 {
2489
    type Output = Self;
2490
    #[inline]
2491
    fn shl(self, rhs: u32) -> Self::Output {
512✔
2492
        Self {
512✔
2493
            x: self.x.shl(rhs),
512✔
2494
            y: self.y.shl(rhs),
512✔
2495
            z: self.z.shl(rhs),
512✔
2496
        }
512✔
2497
    }
512✔
2498
}
2499

2500
impl Shl<&u32> for USizeVec3 {
2501
    type Output = Self;
2502
    #[inline]
2503
    fn shl(self, rhs: &u32) -> Self {
64✔
2504
        self.shl(*rhs)
64✔
2505
    }
64✔
2506
}
2507

2508
impl Shl<&u32> for &USizeVec3 {
2509
    type Output = USizeVec3;
2510
    #[inline]
2511
    fn shl(self, rhs: &u32) -> USizeVec3 {
64✔
2512
        (*self).shl(*rhs)
64✔
2513
    }
64✔
2514
}
2515

2516
impl Shl<u32> for &USizeVec3 {
2517
    type Output = USizeVec3;
2518
    #[inline]
2519
    fn shl(self, rhs: u32) -> USizeVec3 {
64✔
2520
        (*self).shl(rhs)
64✔
2521
    }
64✔
2522
}
2523

2524
impl ShlAssign<u32> for USizeVec3 {
2525
    #[inline]
2526
    fn shl_assign(&mut self, rhs: u32) {
128✔
2527
        *self = self.shl(rhs);
128✔
2528
    }
128✔
2529
}
2530

2531
impl ShlAssign<&u32> for USizeVec3 {
2532
    #[inline]
2533
    fn shl_assign(&mut self, rhs: &u32) {
64✔
2534
        self.shl_assign(*rhs);
64✔
2535
    }
64✔
2536
}
2537

2538
impl Shr<u32> for USizeVec3 {
2539
    type Output = Self;
2540
    #[inline]
2541
    fn shr(self, rhs: u32) -> Self::Output {
512✔
2542
        Self {
512✔
2543
            x: self.x.shr(rhs),
512✔
2544
            y: self.y.shr(rhs),
512✔
2545
            z: self.z.shr(rhs),
512✔
2546
        }
512✔
2547
    }
512✔
2548
}
2549

2550
impl Shr<&u32> for USizeVec3 {
2551
    type Output = Self;
2552
    #[inline]
2553
    fn shr(self, rhs: &u32) -> Self {
64✔
2554
        self.shr(*rhs)
64✔
2555
    }
64✔
2556
}
2557

2558
impl Shr<&u32> for &USizeVec3 {
2559
    type Output = USizeVec3;
2560
    #[inline]
2561
    fn shr(self, rhs: &u32) -> USizeVec3 {
64✔
2562
        (*self).shr(*rhs)
64✔
2563
    }
64✔
2564
}
2565

2566
impl Shr<u32> for &USizeVec3 {
2567
    type Output = USizeVec3;
2568
    #[inline]
2569
    fn shr(self, rhs: u32) -> USizeVec3 {
64✔
2570
        (*self).shr(rhs)
64✔
2571
    }
64✔
2572
}
2573

2574
impl ShrAssign<u32> for USizeVec3 {
2575
    #[inline]
2576
    fn shr_assign(&mut self, rhs: u32) {
128✔
2577
        *self = self.shr(rhs);
128✔
2578
    }
128✔
2579
}
2580

2581
impl ShrAssign<&u32> for USizeVec3 {
2582
    #[inline]
2583
    fn shr_assign(&mut self, rhs: &u32) {
64✔
2584
        self.shr_assign(*rhs);
64✔
2585
    }
64✔
2586
}
2587

2588
impl Shl<u64> for USizeVec3 {
2589
    type Output = Self;
2590
    #[inline]
2591
    fn shl(self, rhs: u64) -> Self::Output {
512✔
2592
        Self {
512✔
2593
            x: self.x.shl(rhs),
512✔
2594
            y: self.y.shl(rhs),
512✔
2595
            z: self.z.shl(rhs),
512✔
2596
        }
512✔
2597
    }
512✔
2598
}
2599

2600
impl Shl<&u64> for USizeVec3 {
2601
    type Output = Self;
2602
    #[inline]
2603
    fn shl(self, rhs: &u64) -> Self {
64✔
2604
        self.shl(*rhs)
64✔
2605
    }
64✔
2606
}
2607

2608
impl Shl<&u64> for &USizeVec3 {
2609
    type Output = USizeVec3;
2610
    #[inline]
2611
    fn shl(self, rhs: &u64) -> USizeVec3 {
64✔
2612
        (*self).shl(*rhs)
64✔
2613
    }
64✔
2614
}
2615

2616
impl Shl<u64> for &USizeVec3 {
2617
    type Output = USizeVec3;
2618
    #[inline]
2619
    fn shl(self, rhs: u64) -> USizeVec3 {
64✔
2620
        (*self).shl(rhs)
64✔
2621
    }
64✔
2622
}
2623

2624
impl ShlAssign<u64> for USizeVec3 {
2625
    #[inline]
2626
    fn shl_assign(&mut self, rhs: u64) {
128✔
2627
        *self = self.shl(rhs);
128✔
2628
    }
128✔
2629
}
2630

2631
impl ShlAssign<&u64> for USizeVec3 {
2632
    #[inline]
2633
    fn shl_assign(&mut self, rhs: &u64) {
64✔
2634
        self.shl_assign(*rhs);
64✔
2635
    }
64✔
2636
}
2637

2638
impl Shr<u64> for USizeVec3 {
2639
    type Output = Self;
2640
    #[inline]
2641
    fn shr(self, rhs: u64) -> Self::Output {
512✔
2642
        Self {
512✔
2643
            x: self.x.shr(rhs),
512✔
2644
            y: self.y.shr(rhs),
512✔
2645
            z: self.z.shr(rhs),
512✔
2646
        }
512✔
2647
    }
512✔
2648
}
2649

2650
impl Shr<&u64> for USizeVec3 {
2651
    type Output = Self;
2652
    #[inline]
2653
    fn shr(self, rhs: &u64) -> Self {
64✔
2654
        self.shr(*rhs)
64✔
2655
    }
64✔
2656
}
2657

2658
impl Shr<&u64> for &USizeVec3 {
2659
    type Output = USizeVec3;
2660
    #[inline]
2661
    fn shr(self, rhs: &u64) -> USizeVec3 {
64✔
2662
        (*self).shr(*rhs)
64✔
2663
    }
64✔
2664
}
2665

2666
impl Shr<u64> for &USizeVec3 {
2667
    type Output = USizeVec3;
2668
    #[inline]
2669
    fn shr(self, rhs: u64) -> USizeVec3 {
64✔
2670
        (*self).shr(rhs)
64✔
2671
    }
64✔
2672
}
2673

2674
impl ShrAssign<u64> for USizeVec3 {
2675
    #[inline]
2676
    fn shr_assign(&mut self, rhs: u64) {
128✔
2677
        *self = self.shr(rhs);
128✔
2678
    }
128✔
2679
}
2680

2681
impl ShrAssign<&u64> for USizeVec3 {
2682
    #[inline]
2683
    fn shr_assign(&mut self, rhs: &u64) {
64✔
2684
        self.shr_assign(*rhs);
64✔
2685
    }
64✔
2686
}
2687

2688
#[cfg(feature = "i32")]
2689
impl Shl<IVec3> for USizeVec3 {
2690
    type Output = Self;
2691
    #[inline]
2692
    fn shl(self, rhs: IVec3) -> Self {
1,024✔
2693
        Self {
1,024✔
2694
            x: self.x.shl(rhs.x),
1,024✔
2695
            y: self.y.shl(rhs.y),
1,024✔
2696
            z: self.z.shl(rhs.z),
1,024✔
2697
        }
1,024✔
2698
    }
1,024✔
2699
}
2700

2701
#[cfg(feature = "i32")]
2702
impl Shl<&IVec3> for USizeVec3 {
2703
    type Output = Self;
2704
    #[inline]
2705
    fn shl(self, rhs: &IVec3) -> Self {
256✔
2706
        self.shl(*rhs)
256✔
2707
    }
256✔
2708
}
2709

2710
#[cfg(feature = "i32")]
2711
impl Shl<&IVec3> for &USizeVec3 {
2712
    type Output = USizeVec3;
2713
    #[inline]
2714
    fn shl(self, rhs: &IVec3) -> USizeVec3 {
256✔
2715
        (*self).shl(*rhs)
256✔
2716
    }
256✔
2717
}
2718

2719
#[cfg(feature = "i32")]
2720
impl Shl<IVec3> for &USizeVec3 {
2721
    type Output = USizeVec3;
2722
    #[inline]
2723
    fn shl(self, rhs: IVec3) -> USizeVec3 {
256✔
2724
        (*self).shl(rhs)
256✔
2725
    }
256✔
2726
}
2727

2728
#[cfg(feature = "i32")]
2729
impl Shr<IVec3> for USizeVec3 {
2730
    type Output = Self;
2731
    #[inline]
2732
    fn shr(self, rhs: IVec3) -> Self {
1,024✔
2733
        Self {
1,024✔
2734
            x: self.x.shr(rhs.x),
1,024✔
2735
            y: self.y.shr(rhs.y),
1,024✔
2736
            z: self.z.shr(rhs.z),
1,024✔
2737
        }
1,024✔
2738
    }
1,024✔
2739
}
2740

2741
#[cfg(feature = "i32")]
2742
impl Shr<&IVec3> for USizeVec3 {
2743
    type Output = Self;
2744
    #[inline]
2745
    fn shr(self, rhs: &IVec3) -> Self {
256✔
2746
        self.shr(*rhs)
256✔
2747
    }
256✔
2748
}
2749

2750
#[cfg(feature = "i32")]
2751
impl Shr<&IVec3> for &USizeVec3 {
2752
    type Output = USizeVec3;
2753
    #[inline]
2754
    fn shr(self, rhs: &IVec3) -> USizeVec3 {
256✔
2755
        (*self).shr(*rhs)
256✔
2756
    }
256✔
2757
}
2758

2759
#[cfg(feature = "i32")]
2760
impl Shr<IVec3> for &USizeVec3 {
2761
    type Output = USizeVec3;
2762
    #[inline]
2763
    fn shr(self, rhs: IVec3) -> USizeVec3 {
256✔
2764
        (*self).shr(rhs)
256✔
2765
    }
256✔
2766
}
2767

2768
#[cfg(feature = "u32")]
2769
impl Shl<UVec3> for USizeVec3 {
2770
    type Output = Self;
2771
    #[inline]
2772
    fn shl(self, rhs: UVec3) -> Self {
1,024✔
2773
        Self {
1,024✔
2774
            x: self.x.shl(rhs.x),
1,024✔
2775
            y: self.y.shl(rhs.y),
1,024✔
2776
            z: self.z.shl(rhs.z),
1,024✔
2777
        }
1,024✔
2778
    }
1,024✔
2779
}
2780

2781
#[cfg(feature = "u32")]
2782
impl Shl<&UVec3> for USizeVec3 {
2783
    type Output = Self;
2784
    #[inline]
2785
    fn shl(self, rhs: &UVec3) -> Self {
256✔
2786
        self.shl(*rhs)
256✔
2787
    }
256✔
2788
}
2789

2790
#[cfg(feature = "u32")]
2791
impl Shl<&UVec3> for &USizeVec3 {
2792
    type Output = USizeVec3;
2793
    #[inline]
2794
    fn shl(self, rhs: &UVec3) -> USizeVec3 {
256✔
2795
        (*self).shl(*rhs)
256✔
2796
    }
256✔
2797
}
2798

2799
#[cfg(feature = "u32")]
2800
impl Shl<UVec3> for &USizeVec3 {
2801
    type Output = USizeVec3;
2802
    #[inline]
2803
    fn shl(self, rhs: UVec3) -> USizeVec3 {
256✔
2804
        (*self).shl(rhs)
256✔
2805
    }
256✔
2806
}
2807

2808
#[cfg(feature = "u32")]
2809
impl Shr<UVec3> for USizeVec3 {
2810
    type Output = Self;
2811
    #[inline]
2812
    fn shr(self, rhs: UVec3) -> Self {
1,024✔
2813
        Self {
1,024✔
2814
            x: self.x.shr(rhs.x),
1,024✔
2815
            y: self.y.shr(rhs.y),
1,024✔
2816
            z: self.z.shr(rhs.z),
1,024✔
2817
        }
1,024✔
2818
    }
1,024✔
2819
}
2820

2821
#[cfg(feature = "u32")]
2822
impl Shr<&UVec3> for USizeVec3 {
2823
    type Output = Self;
2824
    #[inline]
2825
    fn shr(self, rhs: &UVec3) -> Self {
256✔
2826
        self.shr(*rhs)
256✔
2827
    }
256✔
2828
}
2829

2830
#[cfg(feature = "u32")]
2831
impl Shr<&UVec3> for &USizeVec3 {
2832
    type Output = USizeVec3;
2833
    #[inline]
2834
    fn shr(self, rhs: &UVec3) -> USizeVec3 {
256✔
2835
        (*self).shr(*rhs)
256✔
2836
    }
256✔
2837
}
2838

2839
#[cfg(feature = "u32")]
2840
impl Shr<UVec3> for &USizeVec3 {
2841
    type Output = USizeVec3;
2842
    #[inline]
2843
    fn shr(self, rhs: UVec3) -> USizeVec3 {
256✔
2844
        (*self).shr(rhs)
256✔
2845
    }
256✔
2846
}
2847

2848
impl Index<usize> for USizeVec3 {
2849
    type Output = usize;
2850
    #[inline]
2851
    fn index(&self, index: usize) -> &Self::Output {
12✔
2852
        match index {
12✔
2853
            0 => &self.x,
4✔
2854
            1 => &self.y,
4✔
2855
            2 => &self.z,
4✔
2856
            _ => panic!("index out of bounds"),
×
2857
        }
2858
    }
12✔
2859
}
2860

2861
impl IndexMut<usize> for USizeVec3 {
2862
    #[inline]
2863
    fn index_mut(&mut self, index: usize) -> &mut Self::Output {
12✔
2864
        match index {
12✔
2865
            0 => &mut self.x,
4✔
2866
            1 => &mut self.y,
4✔
2867
            2 => &mut self.z,
4✔
2868
            _ => panic!("index out of bounds"),
×
2869
        }
2870
    }
12✔
2871
}
2872

2873
impl fmt::Display for USizeVec3 {
2874
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4✔
2875
        write!(f, "[{}, {}, {}]", self.x, self.y, self.z)
4✔
2876
    }
4✔
2877
}
2878

2879
impl fmt::Debug for USizeVec3 {
2880
    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
8✔
2881
        fmt.debug_tuple(stringify!(USizeVec3))
8✔
2882
            .field(&self.x)
8✔
2883
            .field(&self.y)
8✔
2884
            .field(&self.z)
8✔
2885
            .finish()
8✔
2886
    }
8✔
2887
}
2888

2889
impl From<[usize; 3]> for USizeVec3 {
2890
    #[inline]
2891
    fn from(a: [usize; 3]) -> Self {
4✔
2892
        Self::new(a[0], a[1], a[2])
4✔
2893
    }
4✔
2894
}
2895

2896
impl From<USizeVec3> for [usize; 3] {
2897
    #[inline]
2898
    fn from(v: USizeVec3) -> Self {
4✔
2899
        [v.x, v.y, v.z]
4✔
2900
    }
4✔
2901
}
2902

2903
impl From<(usize, usize, usize)> for USizeVec3 {
2904
    #[inline]
2905
    fn from(t: (usize, usize, usize)) -> Self {
4✔
2906
        Self::new(t.0, t.1, t.2)
4✔
2907
    }
4✔
2908
}
2909

2910
impl From<USizeVec3> for (usize, usize, usize) {
2911
    #[inline]
2912
    fn from(v: USizeVec3) -> Self {
36✔
2913
        (v.x, v.y, v.z)
36✔
2914
    }
36✔
2915
}
2916

2917
impl From<(USizeVec2, usize)> for USizeVec3 {
2918
    #[inline]
2919
    fn from((v, z): (USizeVec2, usize)) -> Self {
×
2920
        Self::new(v.x, v.y, z)
×
2921
    }
×
2922
}
2923

2924
#[cfg(feature = "u8")]
2925
impl From<U8Vec3> for USizeVec3 {
2926
    #[inline]
2927
    fn from(v: U8Vec3) -> Self {
4✔
2928
        Self::new(usize::from(v.x), usize::from(v.y), usize::from(v.z))
4✔
2929
    }
4✔
2930
}
2931

2932
#[cfg(feature = "u16")]
2933
impl From<U16Vec3> for USizeVec3 {
2934
    #[inline]
2935
    fn from(v: U16Vec3) -> Self {
4✔
2936
        Self::new(usize::from(v.x), usize::from(v.y), usize::from(v.z))
4✔
2937
    }
4✔
2938
}
2939

2940
#[cfg(feature = "i8")]
2941
impl TryFrom<I8Vec3> for USizeVec3 {
2942
    type Error = core::num::TryFromIntError;
2943

2944
    #[inline]
2945
    fn try_from(v: I8Vec3) -> Result<Self, Self::Error> {
16✔
2946
        Ok(Self::new(
4✔
2947
            usize::try_from(v.x)?,
16✔
2948
            usize::try_from(v.y)?,
12✔
2949
            usize::try_from(v.z)?,
8✔
2950
        ))
2951
    }
16✔
2952
}
2953

2954
#[cfg(feature = "i16")]
2955
impl TryFrom<I16Vec3> for USizeVec3 {
2956
    type Error = core::num::TryFromIntError;
2957

2958
    #[inline]
2959
    fn try_from(v: I16Vec3) -> Result<Self, Self::Error> {
16✔
2960
        Ok(Self::new(
4✔
2961
            usize::try_from(v.x)?,
16✔
2962
            usize::try_from(v.y)?,
12✔
2963
            usize::try_from(v.z)?,
8✔
2964
        ))
2965
    }
16✔
2966
}
2967

2968
#[cfg(feature = "i32")]
2969
impl TryFrom<IVec3> for USizeVec3 {
2970
    type Error = core::num::TryFromIntError;
2971

2972
    #[inline]
2973
    fn try_from(v: IVec3) -> Result<Self, Self::Error> {
16✔
2974
        Ok(Self::new(
4✔
2975
            usize::try_from(v.x)?,
16✔
2976
            usize::try_from(v.y)?,
12✔
2977
            usize::try_from(v.z)?,
8✔
2978
        ))
2979
    }
16✔
2980
}
2981

2982
#[cfg(feature = "i64")]
2983
impl TryFrom<I64Vec3> for USizeVec3 {
2984
    type Error = core::num::TryFromIntError;
2985

2986
    #[inline]
2987
    fn try_from(v: I64Vec3) -> Result<Self, Self::Error> {
16✔
2988
        Ok(Self::new(
4✔
2989
            usize::try_from(v.x)?,
16✔
2990
            usize::try_from(v.y)?,
12✔
2991
            usize::try_from(v.z)?,
8✔
2992
        ))
2993
    }
16✔
2994
}
2995

2996
#[cfg(feature = "u32")]
2997
impl TryFrom<UVec3> for USizeVec3 {
2998
    type Error = core::num::TryFromIntError;
2999

3000
    #[inline]
3001
    fn try_from(v: UVec3) -> Result<Self, Self::Error> {
4✔
3002
        Ok(Self::new(
4✔
3003
            usize::try_from(v.x)?,
4✔
3004
            usize::try_from(v.y)?,
4✔
3005
            usize::try_from(v.z)?,
4✔
3006
        ))
3007
    }
4✔
3008
}
3009

3010
#[cfg(feature = "u64")]
3011
impl TryFrom<U64Vec3> for USizeVec3 {
3012
    type Error = core::num::TryFromIntError;
3013

3014
    #[inline]
3015
    fn try_from(v: U64Vec3) -> Result<Self, Self::Error> {
4✔
3016
        Ok(Self::new(
4✔
3017
            usize::try_from(v.x)?,
4✔
3018
            usize::try_from(v.y)?,
4✔
3019
            usize::try_from(v.z)?,
4✔
3020
        ))
3021
    }
4✔
3022
}
3023

3024
#[cfg(feature = "isize")]
3025
impl TryFrom<ISizeVec3> for USizeVec3 {
3026
    type Error = core::num::TryFromIntError;
3027

3028
    #[inline]
3029
    fn try_from(v: ISizeVec3) -> Result<Self, Self::Error> {
16✔
3030
        Ok(Self::new(
4✔
3031
            usize::try_from(v.x)?,
16✔
3032
            usize::try_from(v.y)?,
12✔
3033
            usize::try_from(v.z)?,
8✔
3034
        ))
3035
    }
16✔
3036
}
3037

3038
impl From<BVec3> for USizeVec3 {
3039
    #[inline]
3040
    fn from(v: BVec3) -> Self {
12✔
3041
        Self::new(usize::from(v.x), usize::from(v.y), usize::from(v.z))
12✔
3042
    }
12✔
3043
}
3044

3045
impl From<BVec3A> for USizeVec3 {
3046
    #[inline]
3047
    fn from(v: BVec3A) -> Self {
12✔
3048
        let bool_array: [bool; 3] = v.into();
12✔
3049
        Self::new(
12✔
3050
            usize::from(bool_array[0]),
12✔
3051
            usize::from(bool_array[1]),
12✔
3052
            usize::from(bool_array[2]),
12✔
3053
        )
3054
    }
12✔
3055
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc