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

bitshifter / glam-rs / 21560716727

01 Feb 2026 09:46AM UTC coverage: 97.127% (+0.04%) from 97.086%
21560716727

Pull #712

github

bitshifter
More missing tests.
Pull Request #712: Add ISizeVecN types

4031 of 4126 new or added lines in 44 files covered. (97.7%)

1 existing line in 1 file now uncovered.

57206 of 58898 relevant lines covered (97.13%)

3.46 hits per line

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

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

3
use crate::{
4
    BVec3, BVec3A, I16Vec3, I64Vec3, I8Vec3, ISizeVec3, IVec3, U16Vec3, U64Vec3, U8Vec3, USizeVec2,
5
    USizeVec4, UVec3,
6
};
7

8
use core::fmt;
9
use core::iter::{Product, Sum};
10
use core::{f32, ops::*};
11

12
#[cfg(feature = "zerocopy")]
13
use zerocopy_derive::*;
14

15
/// Creates a 3-dimensional vector.
16
#[inline(always)]
17
#[must_use]
18
pub const fn usizevec3(x: usize, y: usize, z: usize) -> USizeVec3 {
6✔
19
    USizeVec3::new(x, y, z)
×
20
}
21

22
/// A 3-dimensional vector.
23
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
24
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
25
#[cfg_attr(
26
    feature = "zerocopy",
27
    derive(FromBytes, Immutable, IntoBytes, KnownLayout)
28
)]
29
#[repr(C)]
30
#[cfg_attr(target_arch = "spirv", rust_gpu::vector::v1)]
31
pub struct USizeVec3 {
32
    pub x: usize,
33
    pub y: usize,
34
    pub z: usize,
35
}
36

37
impl USizeVec3 {
38
    /// All zeroes.
39
    pub const ZERO: Self = Self::splat(0);
40

41
    /// All ones.
42
    pub const ONE: Self = Self::splat(1);
43

44
    /// All `usize::MIN`.
45
    pub const MIN: Self = Self::splat(usize::MIN);
46

47
    /// All `usize::MAX`.
48
    pub const MAX: Self = Self::splat(usize::MAX);
49

50
    /// A unit vector pointing along the positive X axis.
51
    pub const X: Self = Self::new(1, 0, 0);
52

53
    /// A unit vector pointing along the positive Y axis.
54
    pub const Y: Self = Self::new(0, 1, 0);
55

56
    /// A unit vector pointing along the positive Z axis.
57
    pub const Z: Self = Self::new(0, 0, 1);
58

59
    /// The unit axes.
60
    pub const AXES: [Self; 3] = [Self::X, Self::Y, Self::Z];
61

62
    /// Creates a new vector.
63
    #[inline(always)]
64
    #[must_use]
65
    pub const fn new(x: usize, y: usize, z: usize) -> Self {
15✔
66
        Self { x, y, z }
67
    }
68

69
    /// Creates a vector with all elements set to `v`.
70
    #[inline]
71
    #[must_use]
72
    pub const fn splat(v: usize) -> Self {
3✔
73
        Self { x: v, y: v, z: v }
74
    }
75

76
    /// Returns a vector containing each element of `self` modified by a mapping function `f`.
77
    #[inline]
78
    #[must_use]
79
    pub fn map<F>(self, f: F) -> Self
6✔
80
    where
81
        F: Fn(usize) -> usize,
82
    {
83
        Self::new(f(self.x), f(self.y), f(self.z))
12✔
84
    }
85

86
    /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
87
    /// for each element of `self`.
88
    ///
89
    /// A true element in the mask uses the corresponding element from `if_true`, and false
90
    /// uses the element from `if_false`.
91
    #[inline]
92
    #[must_use]
93
    pub fn select(mask: BVec3, if_true: Self, if_false: Self) -> Self {
3✔
94
        Self {
95
            x: if mask.test(0) { if_true.x } else { if_false.x },
3✔
96
            y: if mask.test(1) { if_true.y } else { if_false.y },
3✔
97
            z: if mask.test(2) { if_true.z } else { if_false.z },
3✔
98
        }
99
    }
100

101
    /// Creates a new vector from an array.
102
    #[inline]
103
    #[must_use]
104
    pub const fn from_array(a: [usize; 3]) -> Self {
×
105
        Self::new(a[0], a[1], a[2])
×
106
    }
107

108
    /// Converts `self` to `[x, y, z]`
109
    #[inline]
110
    #[must_use]
111
    pub const fn to_array(&self) -> [usize; 3] {
3✔
112
        [self.x, self.y, self.z]
3✔
113
    }
114

115
    /// Creates a vector from the first 3 values in `slice`.
116
    ///
117
    /// # Panics
118
    ///
119
    /// Panics if `slice` is less than 3 elements long.
120
    #[inline]
121
    #[must_use]
122
    pub const fn from_slice(slice: &[usize]) -> Self {
3✔
123
        assert!(slice.len() >= 3);
3✔
124
        Self::new(slice[0], slice[1], slice[2])
3✔
125
    }
126

127
    /// Writes the elements of `self` to the first 3 elements in `slice`.
128
    ///
129
    /// # Panics
130
    ///
131
    /// Panics if `slice` is less than 3 elements long.
132
    #[inline]
133
    pub fn write_to_slice(self, slice: &mut [usize]) {
3✔
134
        slice[..3].copy_from_slice(&self.to_array());
3✔
135
    }
136

137
    /// Internal method for creating a 3D vector from a 4D vector, discarding `w`.
138
    #[allow(dead_code)]
139
    #[inline]
140
    #[must_use]
141
    pub(crate) fn from_vec4(v: USizeVec4) -> Self {
×
142
        Self {
143
            x: v.x,
×
144
            y: v.y,
×
145
            z: v.z,
×
146
        }
147
    }
148

149
    /// Creates a 4D vector from `self` and the given `w` value.
150
    #[inline]
151
    #[must_use]
152
    pub fn extend(self, w: usize) -> USizeVec4 {
3✔
153
        USizeVec4::new(self.x, self.y, self.z, w)
3✔
154
    }
155

156
    /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.
157
    ///
158
    /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].
159
    #[inline]
160
    #[must_use]
161
    pub fn truncate(self) -> USizeVec2 {
×
162
        use crate::swizzles::Vec3Swizzles;
163
        self.xy()
×
164
    }
165

166
    /// Creates a 3D vector from `self` with the given value of `x`.
167
    #[inline]
168
    #[must_use]
169
    pub fn with_x(mut self, x: usize) -> Self {
3✔
170
        self.x = x;
3✔
171
        self
3✔
172
    }
173

174
    /// Creates a 3D vector from `self` with the given value of `y`.
175
    #[inline]
176
    #[must_use]
177
    pub fn with_y(mut self, y: usize) -> Self {
3✔
178
        self.y = y;
3✔
179
        self
3✔
180
    }
181

182
    /// Creates a 3D vector from `self` with the given value of `z`.
183
    #[inline]
184
    #[must_use]
185
    pub fn with_z(mut self, z: usize) -> Self {
3✔
186
        self.z = z;
3✔
187
        self
3✔
188
    }
189

190
    /// Computes the dot product of `self` and `rhs`.
191
    #[inline]
192
    #[must_use]
193
    pub fn dot(self, rhs: Self) -> usize {
3✔
194
        (self.x * rhs.x) + (self.y * rhs.y) + (self.z * rhs.z)
3✔
195
    }
196

197
    /// Returns a vector where every component is the dot product of `self` and `rhs`.
198
    #[inline]
199
    #[must_use]
200
    pub fn dot_into_vec(self, rhs: Self) -> Self {
3✔
201
        Self::splat(self.dot(rhs))
3✔
202
    }
203

204
    /// Computes the cross product of `self` and `rhs`.
205
    #[inline]
206
    #[must_use]
207
    pub fn cross(self, rhs: Self) -> Self {
3✔
208
        Self {
209
            x: self.y * rhs.z - rhs.y * self.z,
3✔
210
            y: self.z * rhs.x - rhs.z * self.x,
6✔
211
            z: self.x * rhs.y - rhs.x * self.y,
6✔
212
        }
213
    }
214

215
    /// Returns a vector containing the minimum values for each element of `self` and `rhs`.
216
    ///
217
    /// In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.
218
    #[inline]
219
    #[must_use]
220
    pub fn min(self, rhs: Self) -> Self {
3✔
221
        Self {
222
            x: if self.x < rhs.x { self.x } else { rhs.x },
3✔
223
            y: if self.y < rhs.y { self.y } else { rhs.y },
3✔
224
            z: if self.z < rhs.z { self.z } else { rhs.z },
3✔
225
        }
226
    }
227

228
    /// Returns a vector containing the maximum values for each element of `self` and `rhs`.
229
    ///
230
    /// In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.
231
    #[inline]
232
    #[must_use]
233
    pub fn max(self, rhs: Self) -> Self {
3✔
234
        Self {
235
            x: if self.x > rhs.x { self.x } else { rhs.x },
3✔
236
            y: if self.y > rhs.y { self.y } else { rhs.y },
3✔
237
            z: if self.z > rhs.z { self.z } else { rhs.z },
3✔
238
        }
239
    }
240

241
    /// Component-wise clamping of values, similar to [`usize::clamp`].
242
    ///
243
    /// Each element in `min` must be less-or-equal to the corresponding element in `max`.
244
    ///
245
    /// # Panics
246
    ///
247
    /// Will panic if `min` is greater than `max` when `glam_assert` is enabled.
248
    #[inline]
249
    #[must_use]
250
    pub fn clamp(self, min: Self, max: Self) -> Self {
3✔
251
        glam_assert!(min.cmple(max).all(), "clamp: expected min <= max");
3✔
252
        self.max(min).min(max)
3✔
253
    }
254

255
    /// Returns the horizontal minimum of `self`.
256
    ///
257
    /// In other words this computes `min(x, y, ..)`.
258
    #[inline]
259
    #[must_use]
260
    pub fn min_element(self) -> usize {
6✔
261
        let min = |a, b| if a < b { a } else { b };
12✔
262
        min(self.x, min(self.y, self.z))
6✔
263
    }
264

265
    /// Returns the horizontal maximum of `self`.
266
    ///
267
    /// In other words this computes `max(x, y, ..)`.
268
    #[inline]
269
    #[must_use]
270
    pub fn max_element(self) -> usize {
6✔
271
        let max = |a, b| if a > b { a } else { b };
12✔
272
        max(self.x, max(self.y, self.z))
6✔
273
    }
274

275
    /// Returns the index of the first minimum element of `self`.
276
    #[doc(alias = "argmin")]
277
    #[inline]
278
    #[must_use]
279
    pub fn min_position(self) -> usize {
3✔
280
        let mut min = self.x;
3✔
281
        let mut index = 0;
3✔
282
        if self.y < min {
6✔
283
            min = self.y;
3✔
284
            index = 1;
3✔
285
        }
286
        if self.z < min {
6✔
287
            index = 2;
3✔
288
        }
289
        index
3✔
290
    }
291

292
    /// Returns the index of the first maximum element of `self`.
293
    #[doc(alias = "argmax")]
294
    #[inline]
295
    #[must_use]
296
    pub fn max_position(self) -> usize {
3✔
297
        let mut max = self.x;
3✔
298
        let mut index = 0;
3✔
299
        if self.y > max {
6✔
300
            max = self.y;
3✔
301
            index = 1;
3✔
302
        }
303
        if self.z > max {
6✔
304
            index = 2;
3✔
305
        }
306
        index
3✔
307
    }
308

309
    /// Returns the sum of all elements of `self`.
310
    ///
311
    /// In other words, this computes `self.x + self.y + ..`.
312
    #[inline]
313
    #[must_use]
314
    pub fn element_sum(self) -> usize {
3✔
315
        self.x + self.y + self.z
3✔
316
    }
317

318
    /// Returns the product of all elements of `self`.
319
    ///
320
    /// In other words, this computes `self.x * self.y * ..`.
321
    #[inline]
322
    #[must_use]
323
    pub fn element_product(self) -> usize {
3✔
324
        self.x * self.y * self.z
3✔
325
    }
326

327
    /// Returns a vector mask containing the result of a `==` comparison for each element of
328
    /// `self` and `rhs`.
329
    ///
330
    /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all
331
    /// elements.
332
    #[inline]
333
    #[must_use]
334
    pub fn cmpeq(self, rhs: Self) -> BVec3 {
3✔
335
        BVec3::new(self.x.eq(&rhs.x), self.y.eq(&rhs.y), self.z.eq(&rhs.z))
3✔
336
    }
337

338
    /// Returns a vector mask containing the result of a `!=` comparison for each element of
339
    /// `self` and `rhs`.
340
    ///
341
    /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all
342
    /// elements.
343
    #[inline]
344
    #[must_use]
345
    pub fn cmpne(self, rhs: Self) -> BVec3 {
3✔
346
        BVec3::new(self.x.ne(&rhs.x), self.y.ne(&rhs.y), self.z.ne(&rhs.z))
3✔
347
    }
348

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

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

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

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

393
    /// Computes the squared length of `self`.
394
    #[doc(alias = "magnitude2")]
395
    #[inline]
396
    #[must_use]
397
    pub fn length_squared(self) -> usize {
3✔
398
        self.dot(self)
3✔
399
    }
400

401
    /// Computes the [manhattan distance] between two points.
402
    ///
403
    /// # Overflow
404
    /// This method may overflow if the result is greater than [`usize::MAX`].
405
    ///
406
    /// See also [`checked_manhattan_distance`][USizeVec3::checked_manhattan_distance].
407
    ///
408
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
409
    #[inline]
410
    #[must_use]
411
    pub fn manhattan_distance(self, rhs: Self) -> usize {
3✔
412
        self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
3✔
413
    }
414

415
    /// Computes the [manhattan distance] between two points.
416
    ///
417
    /// This will returns [`None`] if the result is greater than [`usize::MAX`].
418
    ///
419
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
420
    #[inline]
421
    #[must_use]
422
    pub fn checked_manhattan_distance(self, rhs: Self) -> Option<usize> {
3✔
423
        let d = self.x.abs_diff(rhs.x);
3✔
424
        let d = d.checked_add(self.y.abs_diff(rhs.y))?;
3✔
425
        d.checked_add(self.z.abs_diff(rhs.z))
3✔
426
    }
427

428
    /// Computes the [chebyshev distance] between two points.
429
    ///
430
    /// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
431
    #[inline]
432
    #[must_use]
433
    pub fn chebyshev_distance(self, rhs: Self) -> usize {
3✔
434
        // Note: the compiler will eventually optimize out the loop
435
        [
436
            self.x.abs_diff(rhs.x),
3✔
437
            self.y.abs_diff(rhs.y),
3✔
438
            self.z.abs_diff(rhs.z),
3✔
439
        ]
440
        .into_iter()
441
        .max()
442
        .unwrap()
443
    }
444

445
    /// Casts all elements of `self` to `f32`.
446
    #[inline]
447
    #[must_use]
448
    pub fn as_vec3(self) -> crate::Vec3 {
3✔
449
        crate::Vec3::new(self.x as f32, self.y as f32, self.z as f32)
3✔
450
    }
451

452
    /// Casts all elements of `self` to `f32`.
453
    #[inline]
454
    #[must_use]
455
    pub fn as_vec3a(self) -> crate::Vec3A {
3✔
456
        crate::Vec3A::new(self.x as f32, self.y as f32, self.z as f32)
3✔
457
    }
458

459
    /// Casts all elements of `self` to `f64`.
460
    #[inline]
461
    #[must_use]
462
    pub fn as_dvec3(self) -> crate::DVec3 {
3✔
463
        crate::DVec3::new(self.x as f64, self.y as f64, self.z as f64)
3✔
464
    }
465

466
    /// Casts all elements of `self` to `i8`.
467
    #[inline]
468
    #[must_use]
469
    pub fn as_i8vec3(self) -> crate::I8Vec3 {
3✔
470
        crate::I8Vec3::new(self.x as i8, self.y as i8, self.z as i8)
3✔
471
    }
472

473
    /// Casts all elements of `self` to `u8`.
474
    #[inline]
475
    #[must_use]
476
    pub fn as_u8vec3(self) -> crate::U8Vec3 {
3✔
477
        crate::U8Vec3::new(self.x as u8, self.y as u8, self.z as u8)
3✔
478
    }
479

480
    /// Casts all elements of `self` to `i16`.
481
    #[inline]
482
    #[must_use]
483
    pub fn as_i16vec3(self) -> crate::I16Vec3 {
3✔
484
        crate::I16Vec3::new(self.x as i16, self.y as i16, self.z as i16)
3✔
485
    }
486

487
    /// Casts all elements of `self` to `u16`.
488
    #[inline]
489
    #[must_use]
490
    pub fn as_u16vec3(self) -> crate::U16Vec3 {
3✔
491
        crate::U16Vec3::new(self.x as u16, self.y as u16, self.z as u16)
3✔
492
    }
493

494
    /// Casts all elements of `self` to `i32`.
495
    #[inline]
496
    #[must_use]
497
    pub fn as_ivec3(self) -> crate::IVec3 {
3✔
498
        crate::IVec3::new(self.x as i32, self.y as i32, self.z as i32)
3✔
499
    }
500

501
    /// Casts all elements of `self` to `u32`.
502
    #[inline]
503
    #[must_use]
504
    pub fn as_uvec3(self) -> crate::UVec3 {
3✔
505
        crate::UVec3::new(self.x as u32, self.y as u32, self.z as u32)
3✔
506
    }
507

508
    /// Casts all elements of `self` to `i64`.
509
    #[inline]
510
    #[must_use]
511
    pub fn as_i64vec3(self) -> crate::I64Vec3 {
3✔
512
        crate::I64Vec3::new(self.x as i64, self.y as i64, self.z as i64)
3✔
513
    }
514

515
    /// Casts all elements of `self` to `u64`.
516
    #[inline]
517
    #[must_use]
518
    pub fn as_u64vec3(self) -> crate::U64Vec3 {
3✔
519
        crate::U64Vec3::new(self.x as u64, self.y as u64, self.z as u64)
3✔
520
    }
521

522
    /// Casts all elements of `self` to `isize`.
523
    #[inline]
524
    #[must_use]
525
    pub fn as_isizevec3(self) -> crate::ISizeVec3 {
3✔
526
        crate::ISizeVec3::new(self.x as isize, self.y as isize, self.z as isize)
3✔
527
    }
528

529
    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
530
    ///
531
    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
532
    #[inline]
533
    #[must_use]
534
    pub const fn checked_add(self, rhs: Self) -> Option<Self> {
3✔
535
        let x = match self.x.checked_add(rhs.x) {
3✔
536
            Some(v) => v,
3✔
537
            None => return None,
3✔
538
        };
539
        let y = match self.y.checked_add(rhs.y) {
3✔
540
            Some(v) => v,
3✔
541
            None => return None,
3✔
542
        };
543
        let z = match self.z.checked_add(rhs.z) {
3✔
544
            Some(v) => v,
3✔
545
            None => return None,
3✔
546
        };
547

548
        Some(Self { x, y, z })
3✔
549
    }
550

551
    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
552
    ///
553
    /// In other words this computes `Some([self.x - rhs.x, self.y - rhs.y, ..])` but returns `None` on any overflow.
554
    #[inline]
555
    #[must_use]
556
    pub const fn checked_sub(self, rhs: Self) -> Option<Self> {
3✔
557
        let x = match self.x.checked_sub(rhs.x) {
3✔
558
            Some(v) => v,
3✔
559
            None => return None,
3✔
560
        };
561
        let y = match self.y.checked_sub(rhs.y) {
3✔
562
            Some(v) => v,
3✔
563
            None => return None,
3✔
564
        };
565
        let z = match self.z.checked_sub(rhs.z) {
3✔
566
            Some(v) => v,
3✔
567
            None => return None,
3✔
568
        };
569

570
        Some(Self { x, y, z })
3✔
571
    }
572

573
    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
574
    ///
575
    /// In other words this computes `Some([self.x * rhs.x, self.y * rhs.y, ..])` but returns `None` on any overflow.
576
    #[inline]
577
    #[must_use]
578
    pub const fn checked_mul(self, rhs: Self) -> Option<Self> {
3✔
579
        let x = match self.x.checked_mul(rhs.x) {
3✔
580
            Some(v) => v,
3✔
581
            None => return None,
3✔
582
        };
583
        let y = match self.y.checked_mul(rhs.y) {
3✔
584
            Some(v) => v,
3✔
585
            None => return None,
×
586
        };
587
        let z = match self.z.checked_mul(rhs.z) {
3✔
588
            Some(v) => v,
3✔
589
            None => return None,
×
590
        };
591

592
        Some(Self { x, y, z })
3✔
593
    }
594

595
    /// Returns a vector containing the wrapping division of `self` and `rhs`.
596
    ///
597
    /// In other words this computes `Some([self.x / rhs.x, self.y / rhs.y, ..])` but returns `None` on any division by zero.
598
    #[inline]
599
    #[must_use]
600
    pub const fn checked_div(self, rhs: Self) -> Option<Self> {
3✔
601
        let x = match self.x.checked_div(rhs.x) {
3✔
602
            Some(v) => v,
3✔
603
            None => return None,
3✔
604
        };
605
        let y = match self.y.checked_div(rhs.y) {
3✔
606
            Some(v) => v,
3✔
607
            None => return None,
3✔
608
        };
609
        let z = match self.z.checked_div(rhs.z) {
3✔
610
            Some(v) => v,
3✔
611
            None => return None,
×
612
        };
613

614
        Some(Self { x, y, z })
3✔
615
    }
616

617
    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
618
    ///
619
    /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.
620
    #[inline]
621
    #[must_use]
622
    pub const fn wrapping_add(self, rhs: Self) -> Self {
3✔
623
        Self {
624
            x: self.x.wrapping_add(rhs.x),
3✔
625
            y: self.y.wrapping_add(rhs.y),
3✔
626
            z: self.z.wrapping_add(rhs.z),
3✔
627
        }
628
    }
629

630
    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
631
    ///
632
    /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.
633
    #[inline]
634
    #[must_use]
635
    pub const fn wrapping_sub(self, rhs: Self) -> Self {
3✔
636
        Self {
637
            x: self.x.wrapping_sub(rhs.x),
3✔
638
            y: self.y.wrapping_sub(rhs.y),
3✔
639
            z: self.z.wrapping_sub(rhs.z),
3✔
640
        }
641
    }
642

643
    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
644
    ///
645
    /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.
646
    #[inline]
647
    #[must_use]
648
    pub const fn wrapping_mul(self, rhs: Self) -> Self {
3✔
649
        Self {
650
            x: self.x.wrapping_mul(rhs.x),
3✔
651
            y: self.y.wrapping_mul(rhs.y),
3✔
652
            z: self.z.wrapping_mul(rhs.z),
3✔
653
        }
654
    }
655

656
    /// Returns a vector containing the wrapping division of `self` and `rhs`.
657
    ///
658
    /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.
659
    #[inline]
660
    #[must_use]
661
    pub const fn wrapping_div(self, rhs: Self) -> Self {
3✔
662
        Self {
663
            x: self.x.wrapping_div(rhs.x),
3✔
664
            y: self.y.wrapping_div(rhs.y),
3✔
665
            z: self.z.wrapping_div(rhs.z),
3✔
666
        }
667
    }
668

669
    /// Returns a vector containing the saturating addition of `self` and `rhs`.
670
    ///
671
    /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.
672
    #[inline]
673
    #[must_use]
674
    pub const fn saturating_add(self, rhs: Self) -> Self {
3✔
675
        Self {
676
            x: self.x.saturating_add(rhs.x),
3✔
677
            y: self.y.saturating_add(rhs.y),
3✔
678
            z: self.z.saturating_add(rhs.z),
3✔
679
        }
680
    }
681

682
    /// Returns a vector containing the saturating subtraction of `self` and `rhs`.
683
    ///
684
    /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.
685
    #[inline]
686
    #[must_use]
687
    pub const fn saturating_sub(self, rhs: Self) -> Self {
3✔
688
        Self {
689
            x: self.x.saturating_sub(rhs.x),
3✔
690
            y: self.y.saturating_sub(rhs.y),
3✔
691
            z: self.z.saturating_sub(rhs.z),
3✔
692
        }
693
    }
694

695
    /// Returns a vector containing the saturating multiplication of `self` and `rhs`.
696
    ///
697
    /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.
698
    #[inline]
699
    #[must_use]
700
    pub const fn saturating_mul(self, rhs: Self) -> Self {
3✔
701
        Self {
702
            x: self.x.saturating_mul(rhs.x),
3✔
703
            y: self.y.saturating_mul(rhs.y),
3✔
704
            z: self.z.saturating_mul(rhs.z),
3✔
705
        }
706
    }
707

708
    /// Returns a vector containing the saturating division of `self` and `rhs`.
709
    ///
710
    /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.
711
    #[inline]
712
    #[must_use]
713
    pub const fn saturating_div(self, rhs: Self) -> Self {
3✔
714
        Self {
715
            x: self.x.saturating_div(rhs.x),
3✔
716
            y: self.y.saturating_div(rhs.y),
3✔
717
            z: self.z.saturating_div(rhs.z),
3✔
718
        }
719
    }
720

721
    /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.
722
    ///
723
    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
724
    #[inline]
725
    #[must_use]
726
    pub const fn checked_add_signed(self, rhs: ISizeVec3) -> Option<Self> {
3✔
727
        let x = match self.x.checked_add_signed(rhs.x) {
3✔
728
            Some(v) => v,
3✔
729
            None => return None,
3✔
730
        };
731
        let y = match self.y.checked_add_signed(rhs.y) {
3✔
732
            Some(v) => v,
3✔
NEW
733
            None => return None,
×
734
        };
735
        let z = match self.z.checked_add_signed(rhs.z) {
3✔
736
            Some(v) => v,
3✔
NEW
737
            None => return None,
×
738
        };
739

740
        Some(Self { x, y, z })
3✔
741
    }
742

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

756
    /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`.
757
    ///
758
    /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.
759
    #[inline]
760
    #[must_use]
761
    pub const fn saturating_add_signed(self, rhs: ISizeVec3) -> Self {
3✔
762
        Self {
763
            x: self.x.saturating_add_signed(rhs.x),
3✔
764
            y: self.y.saturating_add_signed(rhs.y),
3✔
765
            z: self.z.saturating_add_signed(rhs.z),
3✔
766
        }
767
    }
768
}
769

770
impl Default for USizeVec3 {
771
    #[inline(always)]
772
    fn default() -> Self {
3✔
773
        Self::ZERO
3✔
774
    }
775
}
776

777
impl Div for USizeVec3 {
778
    type Output = Self;
779
    #[inline]
780
    fn div(self, rhs: Self) -> Self {
3✔
781
        Self {
782
            x: self.x.div(rhs.x),
3✔
783
            y: self.y.div(rhs.y),
3✔
784
            z: self.z.div(rhs.z),
3✔
785
        }
786
    }
787
}
788

789
impl Div<&Self> for USizeVec3 {
790
    type Output = Self;
791
    #[inline]
792
    fn div(self, rhs: &Self) -> Self {
3✔
793
        self.div(*rhs)
3✔
794
    }
795
}
796

797
impl Div<&USizeVec3> for &USizeVec3 {
798
    type Output = USizeVec3;
799
    #[inline]
800
    fn div(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
801
        (*self).div(*rhs)
3✔
802
    }
803
}
804

805
impl Div<USizeVec3> for &USizeVec3 {
806
    type Output = USizeVec3;
807
    #[inline]
808
    fn div(self, rhs: USizeVec3) -> USizeVec3 {
3✔
809
        (*self).div(rhs)
3✔
810
    }
811
}
812

813
impl DivAssign for USizeVec3 {
814
    #[inline]
815
    fn div_assign(&mut self, rhs: Self) {
3✔
816
        self.x.div_assign(rhs.x);
3✔
817
        self.y.div_assign(rhs.y);
3✔
818
        self.z.div_assign(rhs.z);
3✔
819
    }
820
}
821

822
impl DivAssign<&Self> for USizeVec3 {
823
    #[inline]
824
    fn div_assign(&mut self, rhs: &Self) {
3✔
825
        self.div_assign(*rhs);
3✔
826
    }
827
}
828

829
impl Div<usize> for USizeVec3 {
830
    type Output = Self;
831
    #[inline]
832
    fn div(self, rhs: usize) -> Self {
3✔
833
        Self {
834
            x: self.x.div(rhs),
3✔
835
            y: self.y.div(rhs),
3✔
836
            z: self.z.div(rhs),
3✔
837
        }
838
    }
839
}
840

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

849
impl Div<&usize> for &USizeVec3 {
850
    type Output = USizeVec3;
851
    #[inline]
852
    fn div(self, rhs: &usize) -> USizeVec3 {
3✔
853
        (*self).div(*rhs)
3✔
854
    }
855
}
856

857
impl Div<usize> for &USizeVec3 {
858
    type Output = USizeVec3;
859
    #[inline]
860
    fn div(self, rhs: usize) -> USizeVec3 {
3✔
861
        (*self).div(rhs)
3✔
862
    }
863
}
864

865
impl DivAssign<usize> for USizeVec3 {
866
    #[inline]
867
    fn div_assign(&mut self, rhs: usize) {
3✔
868
        self.x.div_assign(rhs);
3✔
869
        self.y.div_assign(rhs);
3✔
870
        self.z.div_assign(rhs);
3✔
871
    }
872
}
873

874
impl DivAssign<&usize> for USizeVec3 {
875
    #[inline]
876
    fn div_assign(&mut self, rhs: &usize) {
3✔
877
        self.div_assign(*rhs);
3✔
878
    }
879
}
880

881
impl Div<USizeVec3> for usize {
882
    type Output = USizeVec3;
883
    #[inline]
884
    fn div(self, rhs: USizeVec3) -> USizeVec3 {
3✔
885
        USizeVec3 {
886
            x: self.div(rhs.x),
3✔
887
            y: self.div(rhs.y),
3✔
888
            z: self.div(rhs.z),
3✔
889
        }
890
    }
891
}
892

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

901
impl Div<&USizeVec3> for &usize {
902
    type Output = USizeVec3;
903
    #[inline]
904
    fn div(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
905
        (*self).div(*rhs)
3✔
906
    }
907
}
908

909
impl Div<USizeVec3> for &usize {
910
    type Output = USizeVec3;
911
    #[inline]
912
    fn div(self, rhs: USizeVec3) -> USizeVec3 {
3✔
913
        (*self).div(rhs)
3✔
914
    }
915
}
916

917
impl Mul for USizeVec3 {
918
    type Output = Self;
919
    #[inline]
920
    fn mul(self, rhs: Self) -> Self {
3✔
921
        Self {
922
            x: self.x.mul(rhs.x),
3✔
923
            y: self.y.mul(rhs.y),
3✔
924
            z: self.z.mul(rhs.z),
3✔
925
        }
926
    }
927
}
928

929
impl Mul<&Self> for USizeVec3 {
930
    type Output = Self;
931
    #[inline]
932
    fn mul(self, rhs: &Self) -> Self {
3✔
933
        self.mul(*rhs)
3✔
934
    }
935
}
936

937
impl Mul<&USizeVec3> for &USizeVec3 {
938
    type Output = USizeVec3;
939
    #[inline]
940
    fn mul(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
941
        (*self).mul(*rhs)
3✔
942
    }
943
}
944

945
impl Mul<USizeVec3> for &USizeVec3 {
946
    type Output = USizeVec3;
947
    #[inline]
948
    fn mul(self, rhs: USizeVec3) -> USizeVec3 {
3✔
949
        (*self).mul(rhs)
3✔
950
    }
951
}
952

953
impl MulAssign for USizeVec3 {
954
    #[inline]
955
    fn mul_assign(&mut self, rhs: Self) {
3✔
956
        self.x.mul_assign(rhs.x);
3✔
957
        self.y.mul_assign(rhs.y);
3✔
958
        self.z.mul_assign(rhs.z);
3✔
959
    }
960
}
961

962
impl MulAssign<&Self> for USizeVec3 {
963
    #[inline]
964
    fn mul_assign(&mut self, rhs: &Self) {
3✔
965
        self.mul_assign(*rhs);
3✔
966
    }
967
}
968

969
impl Mul<usize> for USizeVec3 {
970
    type Output = Self;
971
    #[inline]
972
    fn mul(self, rhs: usize) -> Self {
3✔
973
        Self {
974
            x: self.x.mul(rhs),
3✔
975
            y: self.y.mul(rhs),
3✔
976
            z: self.z.mul(rhs),
3✔
977
        }
978
    }
979
}
980

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

989
impl Mul<&usize> for &USizeVec3 {
990
    type Output = USizeVec3;
991
    #[inline]
992
    fn mul(self, rhs: &usize) -> USizeVec3 {
3✔
993
        (*self).mul(*rhs)
3✔
994
    }
995
}
996

997
impl Mul<usize> for &USizeVec3 {
998
    type Output = USizeVec3;
999
    #[inline]
1000
    fn mul(self, rhs: usize) -> USizeVec3 {
3✔
1001
        (*self).mul(rhs)
3✔
1002
    }
1003
}
1004

1005
impl MulAssign<usize> for USizeVec3 {
1006
    #[inline]
1007
    fn mul_assign(&mut self, rhs: usize) {
3✔
1008
        self.x.mul_assign(rhs);
3✔
1009
        self.y.mul_assign(rhs);
3✔
1010
        self.z.mul_assign(rhs);
3✔
1011
    }
1012
}
1013

1014
impl MulAssign<&usize> for USizeVec3 {
1015
    #[inline]
1016
    fn mul_assign(&mut self, rhs: &usize) {
3✔
1017
        self.mul_assign(*rhs);
3✔
1018
    }
1019
}
1020

1021
impl Mul<USizeVec3> for usize {
1022
    type Output = USizeVec3;
1023
    #[inline]
1024
    fn mul(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1025
        USizeVec3 {
1026
            x: self.mul(rhs.x),
3✔
1027
            y: self.mul(rhs.y),
3✔
1028
            z: self.mul(rhs.z),
3✔
1029
        }
1030
    }
1031
}
1032

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

1041
impl Mul<&USizeVec3> for &usize {
1042
    type Output = USizeVec3;
1043
    #[inline]
1044
    fn mul(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1045
        (*self).mul(*rhs)
3✔
1046
    }
1047
}
1048

1049
impl Mul<USizeVec3> for &usize {
1050
    type Output = USizeVec3;
1051
    #[inline]
1052
    fn mul(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1053
        (*self).mul(rhs)
3✔
1054
    }
1055
}
1056

1057
impl Add for USizeVec3 {
1058
    type Output = Self;
1059
    #[inline]
1060
    fn add(self, rhs: Self) -> Self {
3✔
1061
        Self {
1062
            x: self.x.add(rhs.x),
3✔
1063
            y: self.y.add(rhs.y),
3✔
1064
            z: self.z.add(rhs.z),
5✔
1065
        }
1066
    }
1067
}
1068

1069
impl Add<&Self> for USizeVec3 {
1070
    type Output = Self;
1071
    #[inline]
1072
    fn add(self, rhs: &Self) -> Self {
3✔
1073
        self.add(*rhs)
3✔
1074
    }
1075
}
1076

1077
impl Add<&USizeVec3> for &USizeVec3 {
1078
    type Output = USizeVec3;
1079
    #[inline]
1080
    fn add(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1081
        (*self).add(*rhs)
3✔
1082
    }
1083
}
1084

1085
impl Add<USizeVec3> for &USizeVec3 {
1086
    type Output = USizeVec3;
1087
    #[inline]
1088
    fn add(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1089
        (*self).add(rhs)
3✔
1090
    }
1091
}
1092

1093
impl AddAssign for USizeVec3 {
1094
    #[inline]
1095
    fn add_assign(&mut self, rhs: Self) {
3✔
1096
        self.x.add_assign(rhs.x);
3✔
1097
        self.y.add_assign(rhs.y);
3✔
1098
        self.z.add_assign(rhs.z);
3✔
1099
    }
1100
}
1101

1102
impl AddAssign<&Self> for USizeVec3 {
1103
    #[inline]
1104
    fn add_assign(&mut self, rhs: &Self) {
3✔
1105
        self.add_assign(*rhs);
3✔
1106
    }
1107
}
1108

1109
impl Add<usize> for USizeVec3 {
1110
    type Output = Self;
1111
    #[inline]
1112
    fn add(self, rhs: usize) -> Self {
3✔
1113
        Self {
1114
            x: self.x.add(rhs),
3✔
1115
            y: self.y.add(rhs),
3✔
1116
            z: self.z.add(rhs),
3✔
1117
        }
1118
    }
1119
}
1120

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

1129
impl Add<&usize> for &USizeVec3 {
1130
    type Output = USizeVec3;
1131
    #[inline]
1132
    fn add(self, rhs: &usize) -> USizeVec3 {
3✔
1133
        (*self).add(*rhs)
3✔
1134
    }
1135
}
1136

1137
impl Add<usize> for &USizeVec3 {
1138
    type Output = USizeVec3;
1139
    #[inline]
1140
    fn add(self, rhs: usize) -> USizeVec3 {
3✔
1141
        (*self).add(rhs)
3✔
1142
    }
1143
}
1144

1145
impl AddAssign<usize> for USizeVec3 {
1146
    #[inline]
1147
    fn add_assign(&mut self, rhs: usize) {
3✔
1148
        self.x.add_assign(rhs);
3✔
1149
        self.y.add_assign(rhs);
3✔
1150
        self.z.add_assign(rhs);
3✔
1151
    }
1152
}
1153

1154
impl AddAssign<&usize> for USizeVec3 {
1155
    #[inline]
1156
    fn add_assign(&mut self, rhs: &usize) {
3✔
1157
        self.add_assign(*rhs);
3✔
1158
    }
1159
}
1160

1161
impl Add<USizeVec3> for usize {
1162
    type Output = USizeVec3;
1163
    #[inline]
1164
    fn add(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1165
        USizeVec3 {
1166
            x: self.add(rhs.x),
3✔
1167
            y: self.add(rhs.y),
3✔
1168
            z: self.add(rhs.z),
3✔
1169
        }
1170
    }
1171
}
1172

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

1181
impl Add<&USizeVec3> for &usize {
1182
    type Output = USizeVec3;
1183
    #[inline]
1184
    fn add(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1185
        (*self).add(*rhs)
3✔
1186
    }
1187
}
1188

1189
impl Add<USizeVec3> for &usize {
1190
    type Output = USizeVec3;
1191
    #[inline]
1192
    fn add(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1193
        (*self).add(rhs)
3✔
1194
    }
1195
}
1196

1197
impl Sub for USizeVec3 {
1198
    type Output = Self;
1199
    #[inline]
1200
    fn sub(self, rhs: Self) -> Self {
3✔
1201
        Self {
1202
            x: self.x.sub(rhs.x),
3✔
1203
            y: self.y.sub(rhs.y),
3✔
1204
            z: self.z.sub(rhs.z),
3✔
1205
        }
1206
    }
1207
}
1208

1209
impl Sub<&Self> for USizeVec3 {
1210
    type Output = Self;
1211
    #[inline]
1212
    fn sub(self, rhs: &Self) -> Self {
3✔
1213
        self.sub(*rhs)
3✔
1214
    }
1215
}
1216

1217
impl Sub<&USizeVec3> for &USizeVec3 {
1218
    type Output = USizeVec3;
1219
    #[inline]
1220
    fn sub(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1221
        (*self).sub(*rhs)
3✔
1222
    }
1223
}
1224

1225
impl Sub<USizeVec3> for &USizeVec3 {
1226
    type Output = USizeVec3;
1227
    #[inline]
1228
    fn sub(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1229
        (*self).sub(rhs)
3✔
1230
    }
1231
}
1232

1233
impl SubAssign for USizeVec3 {
1234
    #[inline]
1235
    fn sub_assign(&mut self, rhs: Self) {
3✔
1236
        self.x.sub_assign(rhs.x);
3✔
1237
        self.y.sub_assign(rhs.y);
3✔
1238
        self.z.sub_assign(rhs.z);
3✔
1239
    }
1240
}
1241

1242
impl SubAssign<&Self> for USizeVec3 {
1243
    #[inline]
1244
    fn sub_assign(&mut self, rhs: &Self) {
3✔
1245
        self.sub_assign(*rhs);
3✔
1246
    }
1247
}
1248

1249
impl Sub<usize> for USizeVec3 {
1250
    type Output = Self;
1251
    #[inline]
1252
    fn sub(self, rhs: usize) -> Self {
3✔
1253
        Self {
1254
            x: self.x.sub(rhs),
3✔
1255
            y: self.y.sub(rhs),
3✔
1256
            z: self.z.sub(rhs),
3✔
1257
        }
1258
    }
1259
}
1260

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

1269
impl Sub<&usize> for &USizeVec3 {
1270
    type Output = USizeVec3;
1271
    #[inline]
1272
    fn sub(self, rhs: &usize) -> USizeVec3 {
3✔
1273
        (*self).sub(*rhs)
3✔
1274
    }
1275
}
1276

1277
impl Sub<usize> for &USizeVec3 {
1278
    type Output = USizeVec3;
1279
    #[inline]
1280
    fn sub(self, rhs: usize) -> USizeVec3 {
3✔
1281
        (*self).sub(rhs)
3✔
1282
    }
1283
}
1284

1285
impl SubAssign<usize> for USizeVec3 {
1286
    #[inline]
1287
    fn sub_assign(&mut self, rhs: usize) {
3✔
1288
        self.x.sub_assign(rhs);
3✔
1289
        self.y.sub_assign(rhs);
3✔
1290
        self.z.sub_assign(rhs);
3✔
1291
    }
1292
}
1293

1294
impl SubAssign<&usize> for USizeVec3 {
1295
    #[inline]
1296
    fn sub_assign(&mut self, rhs: &usize) {
3✔
1297
        self.sub_assign(*rhs);
3✔
1298
    }
1299
}
1300

1301
impl Sub<USizeVec3> for usize {
1302
    type Output = USizeVec3;
1303
    #[inline]
1304
    fn sub(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1305
        USizeVec3 {
1306
            x: self.sub(rhs.x),
3✔
1307
            y: self.sub(rhs.y),
3✔
1308
            z: self.sub(rhs.z),
3✔
1309
        }
1310
    }
1311
}
1312

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

1321
impl Sub<&USizeVec3> for &usize {
1322
    type Output = USizeVec3;
1323
    #[inline]
1324
    fn sub(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1325
        (*self).sub(*rhs)
3✔
1326
    }
1327
}
1328

1329
impl Sub<USizeVec3> for &usize {
1330
    type Output = USizeVec3;
1331
    #[inline]
1332
    fn sub(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1333
        (*self).sub(rhs)
3✔
1334
    }
1335
}
1336

1337
impl Rem for USizeVec3 {
1338
    type Output = Self;
1339
    #[inline]
1340
    fn rem(self, rhs: Self) -> Self {
3✔
1341
        Self {
1342
            x: self.x.rem(rhs.x),
3✔
1343
            y: self.y.rem(rhs.y),
3✔
1344
            z: self.z.rem(rhs.z),
3✔
1345
        }
1346
    }
1347
}
1348

1349
impl Rem<&Self> for USizeVec3 {
1350
    type Output = Self;
1351
    #[inline]
1352
    fn rem(self, rhs: &Self) -> Self {
3✔
1353
        self.rem(*rhs)
3✔
1354
    }
1355
}
1356

1357
impl Rem<&USizeVec3> for &USizeVec3 {
1358
    type Output = USizeVec3;
1359
    #[inline]
1360
    fn rem(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1361
        (*self).rem(*rhs)
3✔
1362
    }
1363
}
1364

1365
impl Rem<USizeVec3> for &USizeVec3 {
1366
    type Output = USizeVec3;
1367
    #[inline]
1368
    fn rem(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1369
        (*self).rem(rhs)
3✔
1370
    }
1371
}
1372

1373
impl RemAssign for USizeVec3 {
1374
    #[inline]
1375
    fn rem_assign(&mut self, rhs: Self) {
3✔
1376
        self.x.rem_assign(rhs.x);
3✔
1377
        self.y.rem_assign(rhs.y);
4✔
1378
        self.z.rem_assign(rhs.z);
4✔
1379
    }
1380
}
1381

1382
impl RemAssign<&Self> for USizeVec3 {
1383
    #[inline]
1384
    fn rem_assign(&mut self, rhs: &Self) {
3✔
1385
        self.rem_assign(*rhs);
3✔
1386
    }
1387
}
1388

1389
impl Rem<usize> for USizeVec3 {
1390
    type Output = Self;
1391
    #[inline]
1392
    fn rem(self, rhs: usize) -> Self {
3✔
1393
        Self {
1394
            x: self.x.rem(rhs),
3✔
1395
            y: self.y.rem(rhs),
3✔
1396
            z: self.z.rem(rhs),
3✔
1397
        }
1398
    }
1399
}
1400

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

1409
impl Rem<&usize> for &USizeVec3 {
1410
    type Output = USizeVec3;
1411
    #[inline]
1412
    fn rem(self, rhs: &usize) -> USizeVec3 {
3✔
1413
        (*self).rem(*rhs)
3✔
1414
    }
1415
}
1416

1417
impl Rem<usize> for &USizeVec3 {
1418
    type Output = USizeVec3;
1419
    #[inline]
1420
    fn rem(self, rhs: usize) -> USizeVec3 {
3✔
1421
        (*self).rem(rhs)
3✔
1422
    }
1423
}
1424

1425
impl RemAssign<usize> for USizeVec3 {
1426
    #[inline]
1427
    fn rem_assign(&mut self, rhs: usize) {
3✔
1428
        self.x.rem_assign(rhs);
3✔
1429
        self.y.rem_assign(rhs);
3✔
1430
        self.z.rem_assign(rhs);
3✔
1431
    }
1432
}
1433

1434
impl RemAssign<&usize> for USizeVec3 {
1435
    #[inline]
1436
    fn rem_assign(&mut self, rhs: &usize) {
3✔
1437
        self.rem_assign(*rhs);
3✔
1438
    }
1439
}
1440

1441
impl Rem<USizeVec3> for usize {
1442
    type Output = USizeVec3;
1443
    #[inline]
1444
    fn rem(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1445
        USizeVec3 {
1446
            x: self.rem(rhs.x),
3✔
1447
            y: self.rem(rhs.y),
3✔
1448
            z: self.rem(rhs.z),
3✔
1449
        }
1450
    }
1451
}
1452

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

1461
impl Rem<&USizeVec3> for &usize {
1462
    type Output = USizeVec3;
1463
    #[inline]
1464
    fn rem(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1465
        (*self).rem(*rhs)
3✔
1466
    }
1467
}
1468

1469
impl Rem<USizeVec3> for &usize {
1470
    type Output = USizeVec3;
1471
    #[inline]
1472
    fn rem(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1473
        (*self).rem(rhs)
3✔
1474
    }
1475
}
1476

1477
impl AsRef<[usize; 3]> for USizeVec3 {
1478
    #[inline]
1479
    fn as_ref(&self) -> &[usize; 3] {
3✔
1480
        unsafe { &*(self as *const Self as *const [usize; 3]) }
3✔
1481
    }
1482
}
1483

1484
impl AsMut<[usize; 3]> for USizeVec3 {
1485
    #[inline]
1486
    fn as_mut(&mut self) -> &mut [usize; 3] {
3✔
1487
        unsafe { &mut *(self as *mut Self as *mut [usize; 3]) }
3✔
1488
    }
1489
}
1490

1491
impl Sum for USizeVec3 {
1492
    #[inline]
1493
    fn sum<I>(iter: I) -> Self
3✔
1494
    where
1495
        I: Iterator<Item = Self>,
1496
    {
1497
        iter.fold(Self::ZERO, Self::add)
3✔
1498
    }
1499
}
1500

1501
impl<'a> Sum<&'a Self> for USizeVec3 {
1502
    #[inline]
1503
    fn sum<I>(iter: I) -> Self
3✔
1504
    where
1505
        I: Iterator<Item = &'a Self>,
1506
    {
1507
        iter.fold(Self::ZERO, |a, &b| Self::add(a, b))
9✔
1508
    }
1509
}
1510

1511
impl Product for USizeVec3 {
1512
    #[inline]
1513
    fn product<I>(iter: I) -> Self
3✔
1514
    where
1515
        I: Iterator<Item = Self>,
1516
    {
1517
        iter.fold(Self::ONE, Self::mul)
3✔
1518
    }
1519
}
1520

1521
impl<'a> Product<&'a Self> for USizeVec3 {
1522
    #[inline]
1523
    fn product<I>(iter: I) -> Self
3✔
1524
    where
1525
        I: Iterator<Item = &'a Self>,
1526
    {
1527
        iter.fold(Self::ONE, |a, &b| Self::mul(a, b))
9✔
1528
    }
1529
}
1530

1531
impl Not for USizeVec3 {
1532
    type Output = Self;
1533
    #[inline]
1534
    fn not(self) -> Self {
3✔
1535
        Self {
1536
            x: self.x.not(),
3✔
1537
            y: self.y.not(),
3✔
1538
            z: self.z.not(),
3✔
1539
        }
1540
    }
1541
}
1542

1543
impl Not for &USizeVec3 {
1544
    type Output = USizeVec3;
1545
    #[inline]
1546
    fn not(self) -> USizeVec3 {
3✔
1547
        (*self).not()
3✔
1548
    }
1549
}
1550

1551
impl BitAnd for USizeVec3 {
1552
    type Output = Self;
1553
    #[inline]
1554
    fn bitand(self, rhs: Self) -> Self::Output {
3✔
1555
        Self {
1556
            x: self.x.bitand(rhs.x),
3✔
1557
            y: self.y.bitand(rhs.y),
3✔
1558
            z: self.z.bitand(rhs.z),
3✔
1559
        }
1560
    }
1561
}
1562

1563
impl BitAnd<&Self> for USizeVec3 {
1564
    type Output = Self;
1565
    #[inline]
1566
    fn bitand(self, rhs: &Self) -> Self {
3✔
1567
        self.bitand(*rhs)
3✔
1568
    }
1569
}
1570

1571
impl BitAnd<&USizeVec3> for &USizeVec3 {
1572
    type Output = USizeVec3;
1573
    #[inline]
1574
    fn bitand(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1575
        (*self).bitand(*rhs)
3✔
1576
    }
1577
}
1578

1579
impl BitAnd<USizeVec3> for &USizeVec3 {
1580
    type Output = USizeVec3;
1581
    #[inline]
1582
    fn bitand(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1583
        (*self).bitand(rhs)
3✔
1584
    }
1585
}
1586

1587
impl BitAndAssign for USizeVec3 {
1588
    #[inline]
1589
    fn bitand_assign(&mut self, rhs: Self) {
3✔
1590
        *self = self.bitand(rhs);
3✔
1591
    }
1592
}
1593

1594
impl BitAndAssign<&Self> for USizeVec3 {
1595
    #[inline]
1596
    fn bitand_assign(&mut self, rhs: &Self) {
3✔
1597
        self.bitand_assign(*rhs);
3✔
1598
    }
1599
}
1600

1601
impl BitOr for USizeVec3 {
1602
    type Output = Self;
1603
    #[inline]
1604
    fn bitor(self, rhs: Self) -> Self::Output {
3✔
1605
        Self {
1606
            x: self.x.bitor(rhs.x),
3✔
1607
            y: self.y.bitor(rhs.y),
3✔
1608
            z: self.z.bitor(rhs.z),
3✔
1609
        }
1610
    }
1611
}
1612

1613
impl BitOr<&Self> for USizeVec3 {
1614
    type Output = Self;
1615
    #[inline]
1616
    fn bitor(self, rhs: &Self) -> Self {
3✔
1617
        self.bitor(*rhs)
3✔
1618
    }
1619
}
1620

1621
impl BitOr<&USizeVec3> for &USizeVec3 {
1622
    type Output = USizeVec3;
1623
    #[inline]
1624
    fn bitor(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1625
        (*self).bitor(*rhs)
3✔
1626
    }
1627
}
1628

1629
impl BitOr<USizeVec3> for &USizeVec3 {
1630
    type Output = USizeVec3;
1631
    #[inline]
1632
    fn bitor(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1633
        (*self).bitor(rhs)
3✔
1634
    }
1635
}
1636

1637
impl BitOrAssign for USizeVec3 {
1638
    #[inline]
1639
    fn bitor_assign(&mut self, rhs: Self) {
3✔
1640
        *self = self.bitor(rhs);
3✔
1641
    }
1642
}
1643

1644
impl BitOrAssign<&Self> for USizeVec3 {
1645
    #[inline]
1646
    fn bitor_assign(&mut self, rhs: &Self) {
3✔
1647
        self.bitor_assign(*rhs);
3✔
1648
    }
1649
}
1650

1651
impl BitXor for USizeVec3 {
1652
    type Output = Self;
1653
    #[inline]
1654
    fn bitxor(self, rhs: Self) -> Self::Output {
3✔
1655
        Self {
1656
            x: self.x.bitxor(rhs.x),
3✔
1657
            y: self.y.bitxor(rhs.y),
3✔
1658
            z: self.z.bitxor(rhs.z),
3✔
1659
        }
1660
    }
1661
}
1662

1663
impl BitXor<&Self> for USizeVec3 {
1664
    type Output = Self;
1665
    #[inline]
1666
    fn bitxor(self, rhs: &Self) -> Self {
3✔
1667
        self.bitxor(*rhs)
3✔
1668
    }
1669
}
1670

1671
impl BitXor<&USizeVec3> for &USizeVec3 {
1672
    type Output = USizeVec3;
1673
    #[inline]
1674
    fn bitxor(self, rhs: &USizeVec3) -> USizeVec3 {
3✔
1675
        (*self).bitxor(*rhs)
3✔
1676
    }
1677
}
1678

1679
impl BitXor<USizeVec3> for &USizeVec3 {
1680
    type Output = USizeVec3;
1681
    #[inline]
1682
    fn bitxor(self, rhs: USizeVec3) -> USizeVec3 {
3✔
1683
        (*self).bitxor(rhs)
3✔
1684
    }
1685
}
1686

1687
impl BitXorAssign for USizeVec3 {
1688
    #[inline]
1689
    fn bitxor_assign(&mut self, rhs: Self) {
3✔
1690
        *self = self.bitxor(rhs);
3✔
1691
    }
1692
}
1693

1694
impl BitXorAssign<&Self> for USizeVec3 {
1695
    #[inline]
1696
    fn bitxor_assign(&mut self, rhs: &Self) {
3✔
1697
        self.bitxor_assign(*rhs);
3✔
1698
    }
1699
}
1700

1701
impl BitAnd<usize> for USizeVec3 {
1702
    type Output = Self;
1703
    #[inline]
1704
    fn bitand(self, rhs: usize) -> Self::Output {
3✔
1705
        Self {
1706
            x: self.x.bitand(rhs),
3✔
1707
            y: self.y.bitand(rhs),
3✔
1708
            z: self.z.bitand(rhs),
3✔
1709
        }
1710
    }
1711
}
1712

1713
impl BitAnd<&usize> for USizeVec3 {
1714
    type Output = Self;
1715
    #[inline]
1716
    fn bitand(self, rhs: &usize) -> Self {
3✔
1717
        self.bitand(*rhs)
3✔
1718
    }
1719
}
1720

1721
impl BitAnd<&usize> for &USizeVec3 {
1722
    type Output = USizeVec3;
1723
    #[inline]
1724
    fn bitand(self, rhs: &usize) -> USizeVec3 {
3✔
1725
        (*self).bitand(*rhs)
3✔
1726
    }
1727
}
1728

1729
impl BitAnd<usize> for &USizeVec3 {
1730
    type Output = USizeVec3;
1731
    #[inline]
1732
    fn bitand(self, rhs: usize) -> USizeVec3 {
3✔
1733
        (*self).bitand(rhs)
3✔
1734
    }
1735
}
1736

1737
impl BitAndAssign<usize> for USizeVec3 {
1738
    #[inline]
1739
    fn bitand_assign(&mut self, rhs: usize) {
3✔
1740
        *self = self.bitand(rhs);
3✔
1741
    }
1742
}
1743

1744
impl BitAndAssign<&usize> for USizeVec3 {
1745
    #[inline]
1746
    fn bitand_assign(&mut self, rhs: &usize) {
3✔
1747
        self.bitand_assign(*rhs);
3✔
1748
    }
1749
}
1750

1751
impl BitOr<usize> for USizeVec3 {
1752
    type Output = Self;
1753
    #[inline]
1754
    fn bitor(self, rhs: usize) -> Self::Output {
3✔
1755
        Self {
1756
            x: self.x.bitor(rhs),
3✔
1757
            y: self.y.bitor(rhs),
3✔
1758
            z: self.z.bitor(rhs),
3✔
1759
        }
1760
    }
1761
}
1762

1763
impl BitOr<&usize> for USizeVec3 {
1764
    type Output = Self;
1765
    #[inline]
1766
    fn bitor(self, rhs: &usize) -> Self {
3✔
1767
        self.bitor(*rhs)
3✔
1768
    }
1769
}
1770

1771
impl BitOr<&usize> for &USizeVec3 {
1772
    type Output = USizeVec3;
1773
    #[inline]
1774
    fn bitor(self, rhs: &usize) -> USizeVec3 {
3✔
1775
        (*self).bitor(*rhs)
3✔
1776
    }
1777
}
1778

1779
impl BitOr<usize> for &USizeVec3 {
1780
    type Output = USizeVec3;
1781
    #[inline]
1782
    fn bitor(self, rhs: usize) -> USizeVec3 {
3✔
1783
        (*self).bitor(rhs)
3✔
1784
    }
1785
}
1786

1787
impl BitOrAssign<usize> for USizeVec3 {
1788
    #[inline]
1789
    fn bitor_assign(&mut self, rhs: usize) {
3✔
1790
        *self = self.bitor(rhs);
3✔
1791
    }
1792
}
1793

1794
impl BitOrAssign<&usize> for USizeVec3 {
1795
    #[inline]
1796
    fn bitor_assign(&mut self, rhs: &usize) {
3✔
1797
        self.bitor_assign(*rhs);
3✔
1798
    }
1799
}
1800

1801
impl BitXor<usize> for USizeVec3 {
1802
    type Output = Self;
1803
    #[inline]
1804
    fn bitxor(self, rhs: usize) -> Self::Output {
3✔
1805
        Self {
1806
            x: self.x.bitxor(rhs),
3✔
1807
            y: self.y.bitxor(rhs),
3✔
1808
            z: self.z.bitxor(rhs),
3✔
1809
        }
1810
    }
1811
}
1812

1813
impl BitXor<&usize> for USizeVec3 {
1814
    type Output = Self;
1815
    #[inline]
1816
    fn bitxor(self, rhs: &usize) -> Self {
3✔
1817
        self.bitxor(*rhs)
3✔
1818
    }
1819
}
1820

1821
impl BitXor<&usize> for &USizeVec3 {
1822
    type Output = USizeVec3;
1823
    #[inline]
1824
    fn bitxor(self, rhs: &usize) -> USizeVec3 {
3✔
1825
        (*self).bitxor(*rhs)
3✔
1826
    }
1827
}
1828

1829
impl BitXor<usize> for &USizeVec3 {
1830
    type Output = USizeVec3;
1831
    #[inline]
1832
    fn bitxor(self, rhs: usize) -> USizeVec3 {
3✔
1833
        (*self).bitxor(rhs)
3✔
1834
    }
1835
}
1836

1837
impl BitXorAssign<usize> for USizeVec3 {
1838
    #[inline]
1839
    fn bitxor_assign(&mut self, rhs: usize) {
3✔
1840
        *self = self.bitxor(rhs);
3✔
1841
    }
1842
}
1843

1844
impl BitXorAssign<&usize> for USizeVec3 {
1845
    #[inline]
1846
    fn bitxor_assign(&mut self, rhs: &usize) {
3✔
1847
        self.bitxor_assign(*rhs);
3✔
1848
    }
1849
}
1850

1851
impl Shl<i8> for USizeVec3 {
1852
    type Output = Self;
1853
    #[inline]
1854
    fn shl(self, rhs: i8) -> Self::Output {
3✔
1855
        Self {
1856
            x: self.x.shl(rhs),
3✔
1857
            y: self.y.shl(rhs),
3✔
1858
            z: self.z.shl(rhs),
3✔
1859
        }
1860
    }
1861
}
1862

1863
impl Shl<&i8> for USizeVec3 {
1864
    type Output = Self;
1865
    #[inline]
1866
    fn shl(self, rhs: &i8) -> Self {
3✔
1867
        self.shl(*rhs)
3✔
1868
    }
1869
}
1870

1871
impl Shl<&i8> for &USizeVec3 {
1872
    type Output = USizeVec3;
1873
    #[inline]
1874
    fn shl(self, rhs: &i8) -> USizeVec3 {
3✔
1875
        (*self).shl(*rhs)
3✔
1876
    }
1877
}
1878

1879
impl Shl<i8> for &USizeVec3 {
1880
    type Output = USizeVec3;
1881
    #[inline]
1882
    fn shl(self, rhs: i8) -> USizeVec3 {
3✔
1883
        (*self).shl(rhs)
3✔
1884
    }
1885
}
1886

1887
impl ShlAssign<i8> for USizeVec3 {
1888
    #[inline]
1889
    fn shl_assign(&mut self, rhs: i8) {
3✔
1890
        *self = self.shl(rhs);
3✔
1891
    }
1892
}
1893

1894
impl ShlAssign<&i8> for USizeVec3 {
1895
    #[inline]
1896
    fn shl_assign(&mut self, rhs: &i8) {
3✔
1897
        self.shl_assign(*rhs);
3✔
1898
    }
1899
}
1900

1901
impl Shr<i8> for USizeVec3 {
1902
    type Output = Self;
1903
    #[inline]
1904
    fn shr(self, rhs: i8) -> Self::Output {
3✔
1905
        Self {
1906
            x: self.x.shr(rhs),
3✔
1907
            y: self.y.shr(rhs),
3✔
1908
            z: self.z.shr(rhs),
3✔
1909
        }
1910
    }
1911
}
1912

1913
impl Shr<&i8> for USizeVec3 {
1914
    type Output = Self;
1915
    #[inline]
1916
    fn shr(self, rhs: &i8) -> Self {
3✔
1917
        self.shr(*rhs)
3✔
1918
    }
1919
}
1920

1921
impl Shr<&i8> for &USizeVec3 {
1922
    type Output = USizeVec3;
1923
    #[inline]
1924
    fn shr(self, rhs: &i8) -> USizeVec3 {
3✔
1925
        (*self).shr(*rhs)
3✔
1926
    }
1927
}
1928

1929
impl Shr<i8> for &USizeVec3 {
1930
    type Output = USizeVec3;
1931
    #[inline]
1932
    fn shr(self, rhs: i8) -> USizeVec3 {
3✔
1933
        (*self).shr(rhs)
3✔
1934
    }
1935
}
1936

1937
impl ShrAssign<i8> for USizeVec3 {
1938
    #[inline]
1939
    fn shr_assign(&mut self, rhs: i8) {
3✔
1940
        *self = self.shr(rhs);
3✔
1941
    }
1942
}
1943

1944
impl ShrAssign<&i8> for USizeVec3 {
1945
    #[inline]
1946
    fn shr_assign(&mut self, rhs: &i8) {
3✔
1947
        self.shr_assign(*rhs);
3✔
1948
    }
1949
}
1950

1951
impl Shl<i16> for USizeVec3 {
1952
    type Output = Self;
1953
    #[inline]
1954
    fn shl(self, rhs: i16) -> Self::Output {
3✔
1955
        Self {
1956
            x: self.x.shl(rhs),
3✔
1957
            y: self.y.shl(rhs),
3✔
1958
            z: self.z.shl(rhs),
3✔
1959
        }
1960
    }
1961
}
1962

1963
impl Shl<&i16> for USizeVec3 {
1964
    type Output = Self;
1965
    #[inline]
1966
    fn shl(self, rhs: &i16) -> Self {
3✔
1967
        self.shl(*rhs)
3✔
1968
    }
1969
}
1970

1971
impl Shl<&i16> for &USizeVec3 {
1972
    type Output = USizeVec3;
1973
    #[inline]
1974
    fn shl(self, rhs: &i16) -> USizeVec3 {
3✔
1975
        (*self).shl(*rhs)
3✔
1976
    }
1977
}
1978

1979
impl Shl<i16> for &USizeVec3 {
1980
    type Output = USizeVec3;
1981
    #[inline]
1982
    fn shl(self, rhs: i16) -> USizeVec3 {
3✔
1983
        (*self).shl(rhs)
3✔
1984
    }
1985
}
1986

1987
impl ShlAssign<i16> for USizeVec3 {
1988
    #[inline]
1989
    fn shl_assign(&mut self, rhs: i16) {
3✔
1990
        *self = self.shl(rhs);
3✔
1991
    }
1992
}
1993

1994
impl ShlAssign<&i16> for USizeVec3 {
1995
    #[inline]
1996
    fn shl_assign(&mut self, rhs: &i16) {
3✔
1997
        self.shl_assign(*rhs);
3✔
1998
    }
1999
}
2000

2001
impl Shr<i16> for USizeVec3 {
2002
    type Output = Self;
2003
    #[inline]
2004
    fn shr(self, rhs: i16) -> Self::Output {
3✔
2005
        Self {
2006
            x: self.x.shr(rhs),
3✔
2007
            y: self.y.shr(rhs),
3✔
2008
            z: self.z.shr(rhs),
3✔
2009
        }
2010
    }
2011
}
2012

2013
impl Shr<&i16> for USizeVec3 {
2014
    type Output = Self;
2015
    #[inline]
2016
    fn shr(self, rhs: &i16) -> Self {
3✔
2017
        self.shr(*rhs)
3✔
2018
    }
2019
}
2020

2021
impl Shr<&i16> for &USizeVec3 {
2022
    type Output = USizeVec3;
2023
    #[inline]
2024
    fn shr(self, rhs: &i16) -> USizeVec3 {
3✔
2025
        (*self).shr(*rhs)
3✔
2026
    }
2027
}
2028

2029
impl Shr<i16> for &USizeVec3 {
2030
    type Output = USizeVec3;
2031
    #[inline]
2032
    fn shr(self, rhs: i16) -> USizeVec3 {
3✔
2033
        (*self).shr(rhs)
3✔
2034
    }
2035
}
2036

2037
impl ShrAssign<i16> for USizeVec3 {
2038
    #[inline]
2039
    fn shr_assign(&mut self, rhs: i16) {
3✔
2040
        *self = self.shr(rhs);
3✔
2041
    }
2042
}
2043

2044
impl ShrAssign<&i16> for USizeVec3 {
2045
    #[inline]
2046
    fn shr_assign(&mut self, rhs: &i16) {
3✔
2047
        self.shr_assign(*rhs);
3✔
2048
    }
2049
}
2050

2051
impl Shl<i32> for USizeVec3 {
2052
    type Output = Self;
2053
    #[inline]
2054
    fn shl(self, rhs: i32) -> Self::Output {
3✔
2055
        Self {
2056
            x: self.x.shl(rhs),
3✔
2057
            y: self.y.shl(rhs),
3✔
2058
            z: self.z.shl(rhs),
3✔
2059
        }
2060
    }
2061
}
2062

2063
impl Shl<&i32> for USizeVec3 {
2064
    type Output = Self;
2065
    #[inline]
2066
    fn shl(self, rhs: &i32) -> Self {
3✔
2067
        self.shl(*rhs)
3✔
2068
    }
2069
}
2070

2071
impl Shl<&i32> for &USizeVec3 {
2072
    type Output = USizeVec3;
2073
    #[inline]
2074
    fn shl(self, rhs: &i32) -> USizeVec3 {
3✔
2075
        (*self).shl(*rhs)
3✔
2076
    }
2077
}
2078

2079
impl Shl<i32> for &USizeVec3 {
2080
    type Output = USizeVec3;
2081
    #[inline]
2082
    fn shl(self, rhs: i32) -> USizeVec3 {
3✔
2083
        (*self).shl(rhs)
3✔
2084
    }
2085
}
2086

2087
impl ShlAssign<i32> for USizeVec3 {
2088
    #[inline]
2089
    fn shl_assign(&mut self, rhs: i32) {
3✔
2090
        *self = self.shl(rhs);
3✔
2091
    }
2092
}
2093

2094
impl ShlAssign<&i32> for USizeVec3 {
2095
    #[inline]
2096
    fn shl_assign(&mut self, rhs: &i32) {
3✔
2097
        self.shl_assign(*rhs);
3✔
2098
    }
2099
}
2100

2101
impl Shr<i32> for USizeVec3 {
2102
    type Output = Self;
2103
    #[inline]
2104
    fn shr(self, rhs: i32) -> Self::Output {
3✔
2105
        Self {
2106
            x: self.x.shr(rhs),
3✔
2107
            y: self.y.shr(rhs),
3✔
2108
            z: self.z.shr(rhs),
3✔
2109
        }
2110
    }
2111
}
2112

2113
impl Shr<&i32> for USizeVec3 {
2114
    type Output = Self;
2115
    #[inline]
2116
    fn shr(self, rhs: &i32) -> Self {
3✔
2117
        self.shr(*rhs)
3✔
2118
    }
2119
}
2120

2121
impl Shr<&i32> for &USizeVec3 {
2122
    type Output = USizeVec3;
2123
    #[inline]
2124
    fn shr(self, rhs: &i32) -> USizeVec3 {
3✔
2125
        (*self).shr(*rhs)
3✔
2126
    }
2127
}
2128

2129
impl Shr<i32> for &USizeVec3 {
2130
    type Output = USizeVec3;
2131
    #[inline]
2132
    fn shr(self, rhs: i32) -> USizeVec3 {
3✔
2133
        (*self).shr(rhs)
3✔
2134
    }
2135
}
2136

2137
impl ShrAssign<i32> for USizeVec3 {
2138
    #[inline]
2139
    fn shr_assign(&mut self, rhs: i32) {
3✔
2140
        *self = self.shr(rhs);
3✔
2141
    }
2142
}
2143

2144
impl ShrAssign<&i32> for USizeVec3 {
2145
    #[inline]
2146
    fn shr_assign(&mut self, rhs: &i32) {
3✔
2147
        self.shr_assign(*rhs);
3✔
2148
    }
2149
}
2150

2151
impl Shl<i64> for USizeVec3 {
2152
    type Output = Self;
2153
    #[inline]
2154
    fn shl(self, rhs: i64) -> Self::Output {
3✔
2155
        Self {
2156
            x: self.x.shl(rhs),
3✔
2157
            y: self.y.shl(rhs),
3✔
2158
            z: self.z.shl(rhs),
3✔
2159
        }
2160
    }
2161
}
2162

2163
impl Shl<&i64> for USizeVec3 {
2164
    type Output = Self;
2165
    #[inline]
2166
    fn shl(self, rhs: &i64) -> Self {
3✔
2167
        self.shl(*rhs)
3✔
2168
    }
2169
}
2170

2171
impl Shl<&i64> for &USizeVec3 {
2172
    type Output = USizeVec3;
2173
    #[inline]
2174
    fn shl(self, rhs: &i64) -> USizeVec3 {
3✔
2175
        (*self).shl(*rhs)
3✔
2176
    }
2177
}
2178

2179
impl Shl<i64> for &USizeVec3 {
2180
    type Output = USizeVec3;
2181
    #[inline]
2182
    fn shl(self, rhs: i64) -> USizeVec3 {
3✔
2183
        (*self).shl(rhs)
3✔
2184
    }
2185
}
2186

2187
impl ShlAssign<i64> for USizeVec3 {
2188
    #[inline]
2189
    fn shl_assign(&mut self, rhs: i64) {
3✔
2190
        *self = self.shl(rhs);
3✔
2191
    }
2192
}
2193

2194
impl ShlAssign<&i64> for USizeVec3 {
2195
    #[inline]
2196
    fn shl_assign(&mut self, rhs: &i64) {
3✔
2197
        self.shl_assign(*rhs);
3✔
2198
    }
2199
}
2200

2201
impl Shr<i64> for USizeVec3 {
2202
    type Output = Self;
2203
    #[inline]
2204
    fn shr(self, rhs: i64) -> Self::Output {
3✔
2205
        Self {
2206
            x: self.x.shr(rhs),
3✔
2207
            y: self.y.shr(rhs),
3✔
2208
            z: self.z.shr(rhs),
3✔
2209
        }
2210
    }
2211
}
2212

2213
impl Shr<&i64> for USizeVec3 {
2214
    type Output = Self;
2215
    #[inline]
2216
    fn shr(self, rhs: &i64) -> Self {
3✔
2217
        self.shr(*rhs)
3✔
2218
    }
2219
}
2220

2221
impl Shr<&i64> for &USizeVec3 {
2222
    type Output = USizeVec3;
2223
    #[inline]
2224
    fn shr(self, rhs: &i64) -> USizeVec3 {
3✔
2225
        (*self).shr(*rhs)
3✔
2226
    }
2227
}
2228

2229
impl Shr<i64> for &USizeVec3 {
2230
    type Output = USizeVec3;
2231
    #[inline]
2232
    fn shr(self, rhs: i64) -> USizeVec3 {
3✔
2233
        (*self).shr(rhs)
3✔
2234
    }
2235
}
2236

2237
impl ShrAssign<i64> for USizeVec3 {
2238
    #[inline]
2239
    fn shr_assign(&mut self, rhs: i64) {
3✔
2240
        *self = self.shr(rhs);
3✔
2241
    }
2242
}
2243

2244
impl ShrAssign<&i64> for USizeVec3 {
2245
    #[inline]
2246
    fn shr_assign(&mut self, rhs: &i64) {
3✔
2247
        self.shr_assign(*rhs);
3✔
2248
    }
2249
}
2250

2251
impl Shl<u8> for USizeVec3 {
2252
    type Output = Self;
2253
    #[inline]
2254
    fn shl(self, rhs: u8) -> Self::Output {
3✔
2255
        Self {
2256
            x: self.x.shl(rhs),
3✔
2257
            y: self.y.shl(rhs),
3✔
2258
            z: self.z.shl(rhs),
3✔
2259
        }
2260
    }
2261
}
2262

2263
impl Shl<&u8> for USizeVec3 {
2264
    type Output = Self;
2265
    #[inline]
2266
    fn shl(self, rhs: &u8) -> Self {
3✔
2267
        self.shl(*rhs)
3✔
2268
    }
2269
}
2270

2271
impl Shl<&u8> for &USizeVec3 {
2272
    type Output = USizeVec3;
2273
    #[inline]
2274
    fn shl(self, rhs: &u8) -> USizeVec3 {
3✔
2275
        (*self).shl(*rhs)
3✔
2276
    }
2277
}
2278

2279
impl Shl<u8> for &USizeVec3 {
2280
    type Output = USizeVec3;
2281
    #[inline]
2282
    fn shl(self, rhs: u8) -> USizeVec3 {
3✔
2283
        (*self).shl(rhs)
3✔
2284
    }
2285
}
2286

2287
impl ShlAssign<u8> for USizeVec3 {
2288
    #[inline]
2289
    fn shl_assign(&mut self, rhs: u8) {
3✔
2290
        *self = self.shl(rhs);
3✔
2291
    }
2292
}
2293

2294
impl ShlAssign<&u8> for USizeVec3 {
2295
    #[inline]
2296
    fn shl_assign(&mut self, rhs: &u8) {
3✔
2297
        self.shl_assign(*rhs);
3✔
2298
    }
2299
}
2300

2301
impl Shr<u8> for USizeVec3 {
2302
    type Output = Self;
2303
    #[inline]
2304
    fn shr(self, rhs: u8) -> Self::Output {
3✔
2305
        Self {
2306
            x: self.x.shr(rhs),
3✔
2307
            y: self.y.shr(rhs),
3✔
2308
            z: self.z.shr(rhs),
3✔
2309
        }
2310
    }
2311
}
2312

2313
impl Shr<&u8> for USizeVec3 {
2314
    type Output = Self;
2315
    #[inline]
2316
    fn shr(self, rhs: &u8) -> Self {
3✔
2317
        self.shr(*rhs)
3✔
2318
    }
2319
}
2320

2321
impl Shr<&u8> for &USizeVec3 {
2322
    type Output = USizeVec3;
2323
    #[inline]
2324
    fn shr(self, rhs: &u8) -> USizeVec3 {
3✔
2325
        (*self).shr(*rhs)
3✔
2326
    }
2327
}
2328

2329
impl Shr<u8> for &USizeVec3 {
2330
    type Output = USizeVec3;
2331
    #[inline]
2332
    fn shr(self, rhs: u8) -> USizeVec3 {
3✔
2333
        (*self).shr(rhs)
3✔
2334
    }
2335
}
2336

2337
impl ShrAssign<u8> for USizeVec3 {
2338
    #[inline]
2339
    fn shr_assign(&mut self, rhs: u8) {
3✔
2340
        *self = self.shr(rhs);
3✔
2341
    }
2342
}
2343

2344
impl ShrAssign<&u8> for USizeVec3 {
2345
    #[inline]
2346
    fn shr_assign(&mut self, rhs: &u8) {
3✔
2347
        self.shr_assign(*rhs);
3✔
2348
    }
2349
}
2350

2351
impl Shl<u16> for USizeVec3 {
2352
    type Output = Self;
2353
    #[inline]
2354
    fn shl(self, rhs: u16) -> Self::Output {
3✔
2355
        Self {
2356
            x: self.x.shl(rhs),
3✔
2357
            y: self.y.shl(rhs),
3✔
2358
            z: self.z.shl(rhs),
3✔
2359
        }
2360
    }
2361
}
2362

2363
impl Shl<&u16> for USizeVec3 {
2364
    type Output = Self;
2365
    #[inline]
2366
    fn shl(self, rhs: &u16) -> Self {
3✔
2367
        self.shl(*rhs)
3✔
2368
    }
2369
}
2370

2371
impl Shl<&u16> for &USizeVec3 {
2372
    type Output = USizeVec3;
2373
    #[inline]
2374
    fn shl(self, rhs: &u16) -> USizeVec3 {
3✔
2375
        (*self).shl(*rhs)
3✔
2376
    }
2377
}
2378

2379
impl Shl<u16> for &USizeVec3 {
2380
    type Output = USizeVec3;
2381
    #[inline]
2382
    fn shl(self, rhs: u16) -> USizeVec3 {
3✔
2383
        (*self).shl(rhs)
3✔
2384
    }
2385
}
2386

2387
impl ShlAssign<u16> for USizeVec3 {
2388
    #[inline]
2389
    fn shl_assign(&mut self, rhs: u16) {
3✔
2390
        *self = self.shl(rhs);
3✔
2391
    }
2392
}
2393

2394
impl ShlAssign<&u16> for USizeVec3 {
2395
    #[inline]
2396
    fn shl_assign(&mut self, rhs: &u16) {
3✔
2397
        self.shl_assign(*rhs);
3✔
2398
    }
2399
}
2400

2401
impl Shr<u16> for USizeVec3 {
2402
    type Output = Self;
2403
    #[inline]
2404
    fn shr(self, rhs: u16) -> Self::Output {
3✔
2405
        Self {
2406
            x: self.x.shr(rhs),
3✔
2407
            y: self.y.shr(rhs),
3✔
2408
            z: self.z.shr(rhs),
3✔
2409
        }
2410
    }
2411
}
2412

2413
impl Shr<&u16> for USizeVec3 {
2414
    type Output = Self;
2415
    #[inline]
2416
    fn shr(self, rhs: &u16) -> Self {
3✔
2417
        self.shr(*rhs)
3✔
2418
    }
2419
}
2420

2421
impl Shr<&u16> for &USizeVec3 {
2422
    type Output = USizeVec3;
2423
    #[inline]
2424
    fn shr(self, rhs: &u16) -> USizeVec3 {
3✔
2425
        (*self).shr(*rhs)
3✔
2426
    }
2427
}
2428

2429
impl Shr<u16> for &USizeVec3 {
2430
    type Output = USizeVec3;
2431
    #[inline]
2432
    fn shr(self, rhs: u16) -> USizeVec3 {
3✔
2433
        (*self).shr(rhs)
3✔
2434
    }
2435
}
2436

2437
impl ShrAssign<u16> for USizeVec3 {
2438
    #[inline]
2439
    fn shr_assign(&mut self, rhs: u16) {
3✔
2440
        *self = self.shr(rhs);
3✔
2441
    }
2442
}
2443

2444
impl ShrAssign<&u16> for USizeVec3 {
2445
    #[inline]
2446
    fn shr_assign(&mut self, rhs: &u16) {
3✔
2447
        self.shr_assign(*rhs);
3✔
2448
    }
2449
}
2450

2451
impl Shl<u32> for USizeVec3 {
2452
    type Output = Self;
2453
    #[inline]
2454
    fn shl(self, rhs: u32) -> Self::Output {
3✔
2455
        Self {
2456
            x: self.x.shl(rhs),
3✔
2457
            y: self.y.shl(rhs),
3✔
2458
            z: self.z.shl(rhs),
3✔
2459
        }
2460
    }
2461
}
2462

2463
impl Shl<&u32> for USizeVec3 {
2464
    type Output = Self;
2465
    #[inline]
2466
    fn shl(self, rhs: &u32) -> Self {
3✔
2467
        self.shl(*rhs)
3✔
2468
    }
2469
}
2470

2471
impl Shl<&u32> for &USizeVec3 {
2472
    type Output = USizeVec3;
2473
    #[inline]
2474
    fn shl(self, rhs: &u32) -> USizeVec3 {
3✔
2475
        (*self).shl(*rhs)
3✔
2476
    }
2477
}
2478

2479
impl Shl<u32> for &USizeVec3 {
2480
    type Output = USizeVec3;
2481
    #[inline]
2482
    fn shl(self, rhs: u32) -> USizeVec3 {
3✔
2483
        (*self).shl(rhs)
3✔
2484
    }
2485
}
2486

2487
impl ShlAssign<u32> for USizeVec3 {
2488
    #[inline]
2489
    fn shl_assign(&mut self, rhs: u32) {
3✔
2490
        *self = self.shl(rhs);
3✔
2491
    }
2492
}
2493

2494
impl ShlAssign<&u32> for USizeVec3 {
2495
    #[inline]
2496
    fn shl_assign(&mut self, rhs: &u32) {
3✔
2497
        self.shl_assign(*rhs);
3✔
2498
    }
2499
}
2500

2501
impl Shr<u32> for USizeVec3 {
2502
    type Output = Self;
2503
    #[inline]
2504
    fn shr(self, rhs: u32) -> Self::Output {
3✔
2505
        Self {
2506
            x: self.x.shr(rhs),
3✔
2507
            y: self.y.shr(rhs),
3✔
2508
            z: self.z.shr(rhs),
3✔
2509
        }
2510
    }
2511
}
2512

2513
impl Shr<&u32> for USizeVec3 {
2514
    type Output = Self;
2515
    #[inline]
2516
    fn shr(self, rhs: &u32) -> Self {
3✔
2517
        self.shr(*rhs)
3✔
2518
    }
2519
}
2520

2521
impl Shr<&u32> for &USizeVec3 {
2522
    type Output = USizeVec3;
2523
    #[inline]
2524
    fn shr(self, rhs: &u32) -> USizeVec3 {
3✔
2525
        (*self).shr(*rhs)
3✔
2526
    }
2527
}
2528

2529
impl Shr<u32> for &USizeVec3 {
2530
    type Output = USizeVec3;
2531
    #[inline]
2532
    fn shr(self, rhs: u32) -> USizeVec3 {
3✔
2533
        (*self).shr(rhs)
3✔
2534
    }
2535
}
2536

2537
impl ShrAssign<u32> for USizeVec3 {
2538
    #[inline]
2539
    fn shr_assign(&mut self, rhs: u32) {
3✔
2540
        *self = self.shr(rhs);
3✔
2541
    }
2542
}
2543

2544
impl ShrAssign<&u32> for USizeVec3 {
2545
    #[inline]
2546
    fn shr_assign(&mut self, rhs: &u32) {
3✔
2547
        self.shr_assign(*rhs);
3✔
2548
    }
2549
}
2550

2551
impl Shl<u64> for USizeVec3 {
2552
    type Output = Self;
2553
    #[inline]
2554
    fn shl(self, rhs: u64) -> Self::Output {
3✔
2555
        Self {
2556
            x: self.x.shl(rhs),
3✔
2557
            y: self.y.shl(rhs),
3✔
2558
            z: self.z.shl(rhs),
3✔
2559
        }
2560
    }
2561
}
2562

2563
impl Shl<&u64> for USizeVec3 {
2564
    type Output = Self;
2565
    #[inline]
2566
    fn shl(self, rhs: &u64) -> Self {
3✔
2567
        self.shl(*rhs)
3✔
2568
    }
2569
}
2570

2571
impl Shl<&u64> for &USizeVec3 {
2572
    type Output = USizeVec3;
2573
    #[inline]
2574
    fn shl(self, rhs: &u64) -> USizeVec3 {
3✔
2575
        (*self).shl(*rhs)
3✔
2576
    }
2577
}
2578

2579
impl Shl<u64> for &USizeVec3 {
2580
    type Output = USizeVec3;
2581
    #[inline]
2582
    fn shl(self, rhs: u64) -> USizeVec3 {
3✔
2583
        (*self).shl(rhs)
3✔
2584
    }
2585
}
2586

2587
impl ShlAssign<u64> for USizeVec3 {
2588
    #[inline]
2589
    fn shl_assign(&mut self, rhs: u64) {
3✔
2590
        *self = self.shl(rhs);
3✔
2591
    }
2592
}
2593

2594
impl ShlAssign<&u64> for USizeVec3 {
2595
    #[inline]
2596
    fn shl_assign(&mut self, rhs: &u64) {
3✔
2597
        self.shl_assign(*rhs);
3✔
2598
    }
2599
}
2600

2601
impl Shr<u64> for USizeVec3 {
2602
    type Output = Self;
2603
    #[inline]
2604
    fn shr(self, rhs: u64) -> Self::Output {
3✔
2605
        Self {
2606
            x: self.x.shr(rhs),
3✔
2607
            y: self.y.shr(rhs),
3✔
2608
            z: self.z.shr(rhs),
3✔
2609
        }
2610
    }
2611
}
2612

2613
impl Shr<&u64> for USizeVec3 {
2614
    type Output = Self;
2615
    #[inline]
2616
    fn shr(self, rhs: &u64) -> Self {
3✔
2617
        self.shr(*rhs)
3✔
2618
    }
2619
}
2620

2621
impl Shr<&u64> for &USizeVec3 {
2622
    type Output = USizeVec3;
2623
    #[inline]
2624
    fn shr(self, rhs: &u64) -> USizeVec3 {
3✔
2625
        (*self).shr(*rhs)
3✔
2626
    }
2627
}
2628

2629
impl Shr<u64> for &USizeVec3 {
2630
    type Output = USizeVec3;
2631
    #[inline]
2632
    fn shr(self, rhs: u64) -> USizeVec3 {
3✔
2633
        (*self).shr(rhs)
3✔
2634
    }
2635
}
2636

2637
impl ShrAssign<u64> for USizeVec3 {
2638
    #[inline]
2639
    fn shr_assign(&mut self, rhs: u64) {
3✔
2640
        *self = self.shr(rhs);
3✔
2641
    }
2642
}
2643

2644
impl ShrAssign<&u64> for USizeVec3 {
2645
    #[inline]
2646
    fn shr_assign(&mut self, rhs: &u64) {
3✔
2647
        self.shr_assign(*rhs);
3✔
2648
    }
2649
}
2650

2651
impl Shl<IVec3> for USizeVec3 {
2652
    type Output = Self;
2653
    #[inline]
2654
    fn shl(self, rhs: IVec3) -> Self {
3✔
2655
        Self {
2656
            x: self.x.shl(rhs.x),
3✔
2657
            y: self.y.shl(rhs.y),
3✔
2658
            z: self.z.shl(rhs.z),
3✔
2659
        }
2660
    }
2661
}
2662

2663
impl Shl<&IVec3> for USizeVec3 {
2664
    type Output = Self;
2665
    #[inline]
2666
    fn shl(self, rhs: &IVec3) -> Self {
3✔
2667
        self.shl(*rhs)
3✔
2668
    }
2669
}
2670

2671
impl Shl<&IVec3> for &USizeVec3 {
2672
    type Output = USizeVec3;
2673
    #[inline]
2674
    fn shl(self, rhs: &IVec3) -> USizeVec3 {
3✔
2675
        (*self).shl(*rhs)
3✔
2676
    }
2677
}
2678

2679
impl Shl<IVec3> for &USizeVec3 {
2680
    type Output = USizeVec3;
2681
    #[inline]
2682
    fn shl(self, rhs: IVec3) -> USizeVec3 {
3✔
2683
        (*self).shl(rhs)
3✔
2684
    }
2685
}
2686

2687
impl Shr<IVec3> for USizeVec3 {
2688
    type Output = Self;
2689
    #[inline]
2690
    fn shr(self, rhs: IVec3) -> Self {
3✔
2691
        Self {
2692
            x: self.x.shr(rhs.x),
3✔
2693
            y: self.y.shr(rhs.y),
3✔
2694
            z: self.z.shr(rhs.z),
3✔
2695
        }
2696
    }
2697
}
2698

2699
impl Shr<&IVec3> for USizeVec3 {
2700
    type Output = Self;
2701
    #[inline]
2702
    fn shr(self, rhs: &IVec3) -> Self {
3✔
2703
        self.shr(*rhs)
3✔
2704
    }
2705
}
2706

2707
impl Shr<&IVec3> for &USizeVec3 {
2708
    type Output = USizeVec3;
2709
    #[inline]
2710
    fn shr(self, rhs: &IVec3) -> USizeVec3 {
3✔
2711
        (*self).shr(*rhs)
3✔
2712
    }
2713
}
2714

2715
impl Shr<IVec3> for &USizeVec3 {
2716
    type Output = USizeVec3;
2717
    #[inline]
2718
    fn shr(self, rhs: IVec3) -> USizeVec3 {
3✔
2719
        (*self).shr(rhs)
3✔
2720
    }
2721
}
2722

2723
impl Shl<UVec3> for USizeVec3 {
2724
    type Output = Self;
2725
    #[inline]
2726
    fn shl(self, rhs: UVec3) -> Self {
3✔
2727
        Self {
2728
            x: self.x.shl(rhs.x),
3✔
2729
            y: self.y.shl(rhs.y),
3✔
2730
            z: self.z.shl(rhs.z),
3✔
2731
        }
2732
    }
2733
}
2734

2735
impl Shl<&UVec3> for USizeVec3 {
2736
    type Output = Self;
2737
    #[inline]
2738
    fn shl(self, rhs: &UVec3) -> Self {
3✔
2739
        self.shl(*rhs)
3✔
2740
    }
2741
}
2742

2743
impl Shl<&UVec3> for &USizeVec3 {
2744
    type Output = USizeVec3;
2745
    #[inline]
2746
    fn shl(self, rhs: &UVec3) -> USizeVec3 {
3✔
2747
        (*self).shl(*rhs)
3✔
2748
    }
2749
}
2750

2751
impl Shl<UVec3> for &USizeVec3 {
2752
    type Output = USizeVec3;
2753
    #[inline]
2754
    fn shl(self, rhs: UVec3) -> USizeVec3 {
3✔
2755
        (*self).shl(rhs)
3✔
2756
    }
2757
}
2758

2759
impl Shr<UVec3> for USizeVec3 {
2760
    type Output = Self;
2761
    #[inline]
2762
    fn shr(self, rhs: UVec3) -> Self {
3✔
2763
        Self {
2764
            x: self.x.shr(rhs.x),
3✔
2765
            y: self.y.shr(rhs.y),
3✔
2766
            z: self.z.shr(rhs.z),
3✔
2767
        }
2768
    }
2769
}
2770

2771
impl Shr<&UVec3> for USizeVec3 {
2772
    type Output = Self;
2773
    #[inline]
2774
    fn shr(self, rhs: &UVec3) -> Self {
3✔
2775
        self.shr(*rhs)
3✔
2776
    }
2777
}
2778

2779
impl Shr<&UVec3> for &USizeVec3 {
2780
    type Output = USizeVec3;
2781
    #[inline]
2782
    fn shr(self, rhs: &UVec3) -> USizeVec3 {
3✔
2783
        (*self).shr(*rhs)
3✔
2784
    }
2785
}
2786

2787
impl Shr<UVec3> for &USizeVec3 {
2788
    type Output = USizeVec3;
2789
    #[inline]
2790
    fn shr(self, rhs: UVec3) -> USizeVec3 {
3✔
2791
        (*self).shr(rhs)
3✔
2792
    }
2793
}
2794

2795
impl Index<usize> for USizeVec3 {
2796
    type Output = usize;
2797
    #[inline]
2798
    fn index(&self, index: usize) -> &Self::Output {
3✔
2799
        match index {
6✔
2800
            0 => &self.x,
3✔
2801
            1 => &self.y,
3✔
2802
            2 => &self.z,
3✔
2803
            _ => panic!("index out of bounds"),
×
2804
        }
2805
    }
2806
}
2807

2808
impl IndexMut<usize> for USizeVec3 {
2809
    #[inline]
2810
    fn index_mut(&mut self, index: usize) -> &mut Self::Output {
3✔
2811
        match index {
6✔
2812
            0 => &mut self.x,
3✔
2813
            1 => &mut self.y,
3✔
2814
            2 => &mut self.z,
3✔
2815
            _ => panic!("index out of bounds"),
×
2816
        }
2817
    }
2818
}
2819

2820
impl fmt::Display for USizeVec3 {
2821
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3✔
2822
        write!(f, "[{}, {}, {}]", self.x, self.y, self.z)
3✔
2823
    }
2824
}
2825

2826
impl fmt::Debug for USizeVec3 {
2827
    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
3✔
2828
        fmt.debug_tuple(stringify!(USizeVec3))
3✔
2829
            .field(&self.x)
3✔
2830
            .field(&self.y)
3✔
2831
            .field(&self.z)
3✔
2832
            .finish()
2833
    }
2834
}
2835

2836
impl From<[usize; 3]> for USizeVec3 {
2837
    #[inline]
2838
    fn from(a: [usize; 3]) -> Self {
3✔
2839
        Self::new(a[0], a[1], a[2])
3✔
2840
    }
2841
}
2842

2843
impl From<USizeVec3> for [usize; 3] {
2844
    #[inline]
2845
    fn from(v: USizeVec3) -> Self {
3✔
2846
        [v.x, v.y, v.z]
3✔
2847
    }
2848
}
2849

2850
impl From<(usize, usize, usize)> for USizeVec3 {
2851
    #[inline]
2852
    fn from(t: (usize, usize, usize)) -> Self {
3✔
2853
        Self::new(t.0, t.1, t.2)
3✔
2854
    }
2855
}
2856

2857
impl From<USizeVec3> for (usize, usize, usize) {
2858
    #[inline]
2859
    fn from(v: USizeVec3) -> Self {
3✔
2860
        (v.x, v.y, v.z)
3✔
2861
    }
2862
}
2863

2864
impl From<(USizeVec2, usize)> for USizeVec3 {
2865
    #[inline]
2866
    fn from((v, z): (USizeVec2, usize)) -> Self {
×
2867
        Self::new(v.x, v.y, z)
×
2868
    }
2869
}
2870

2871
impl From<U8Vec3> for USizeVec3 {
2872
    #[inline]
2873
    fn from(v: U8Vec3) -> Self {
3✔
2874
        Self::new(usize::from(v.x), usize::from(v.y), usize::from(v.z))
3✔
2875
    }
2876
}
2877

2878
impl From<U16Vec3> for USizeVec3 {
2879
    #[inline]
2880
    fn from(v: U16Vec3) -> Self {
3✔
2881
        Self::new(usize::from(v.x), usize::from(v.y), usize::from(v.z))
3✔
2882
    }
2883
}
2884

2885
impl TryFrom<I8Vec3> for USizeVec3 {
2886
    type Error = core::num::TryFromIntError;
2887

2888
    #[inline]
2889
    fn try_from(v: I8Vec3) -> Result<Self, Self::Error> {
3✔
2890
        Ok(Self::new(
3✔
2891
            usize::try_from(v.x)?,
3✔
2892
            usize::try_from(v.y)?,
3✔
2893
            usize::try_from(v.z)?,
3✔
2894
        ))
2895
    }
2896
}
2897

2898
impl TryFrom<I16Vec3> for USizeVec3 {
2899
    type Error = core::num::TryFromIntError;
2900

2901
    #[inline]
2902
    fn try_from(v: I16Vec3) -> Result<Self, Self::Error> {
3✔
2903
        Ok(Self::new(
3✔
2904
            usize::try_from(v.x)?,
3✔
2905
            usize::try_from(v.y)?,
3✔
2906
            usize::try_from(v.z)?,
3✔
2907
        ))
2908
    }
2909
}
2910

2911
impl TryFrom<IVec3> for USizeVec3 {
2912
    type Error = core::num::TryFromIntError;
2913

2914
    #[inline]
2915
    fn try_from(v: IVec3) -> Result<Self, Self::Error> {
3✔
2916
        Ok(Self::new(
3✔
2917
            usize::try_from(v.x)?,
3✔
2918
            usize::try_from(v.y)?,
3✔
2919
            usize::try_from(v.z)?,
3✔
2920
        ))
2921
    }
2922
}
2923

2924
impl TryFrom<I64Vec3> for USizeVec3 {
2925
    type Error = core::num::TryFromIntError;
2926

2927
    #[inline]
2928
    fn try_from(v: I64Vec3) -> Result<Self, Self::Error> {
3✔
2929
        Ok(Self::new(
3✔
2930
            usize::try_from(v.x)?,
3✔
2931
            usize::try_from(v.y)?,
3✔
2932
            usize::try_from(v.z)?,
3✔
2933
        ))
2934
    }
2935
}
2936

2937
impl TryFrom<UVec3> for USizeVec3 {
2938
    type Error = core::num::TryFromIntError;
2939

2940
    #[inline]
2941
    fn try_from(v: UVec3) -> Result<Self, Self::Error> {
3✔
2942
        Ok(Self::new(
3✔
2943
            usize::try_from(v.x)?,
3✔
2944
            usize::try_from(v.y)?,
3✔
2945
            usize::try_from(v.z)?,
3✔
2946
        ))
2947
    }
2948
}
2949

2950
impl TryFrom<U64Vec3> for USizeVec3 {
2951
    type Error = core::num::TryFromIntError;
2952

2953
    #[inline]
2954
    fn try_from(v: U64Vec3) -> Result<Self, Self::Error> {
3✔
2955
        Ok(Self::new(
3✔
2956
            usize::try_from(v.x)?,
3✔
2957
            usize::try_from(v.y)?,
3✔
2958
            usize::try_from(v.z)?,
3✔
2959
        ))
2960
    }
2961
}
2962

2963
impl TryFrom<ISizeVec3> for USizeVec3 {
2964
    type Error = core::num::TryFromIntError;
2965

2966
    #[inline]
2967
    fn try_from(v: ISizeVec3) -> Result<Self, Self::Error> {
3✔
2968
        Ok(Self::new(
3✔
2969
            usize::try_from(v.x)?,
3✔
2970
            usize::try_from(v.y)?,
3✔
2971
            usize::try_from(v.z)?,
3✔
2972
        ))
2973
    }
2974
}
2975

2976
impl From<BVec3> for USizeVec3 {
2977
    #[inline]
2978
    fn from(v: BVec3) -> Self {
3✔
2979
        Self::new(usize::from(v.x), usize::from(v.y), usize::from(v.z))
3✔
2980
    }
2981
}
2982

2983
impl From<BVec3A> for USizeVec3 {
2984
    #[inline]
2985
    fn from(v: BVec3A) -> Self {
3✔
2986
        let bool_array: [bool; 3] = v.into();
3✔
2987
        Self::new(
2988
            usize::from(bool_array[0]),
3✔
2989
            usize::from(bool_array[1]),
3✔
2990
            usize::from(bool_array[2]),
3✔
2991
        )
2992
    }
2993
}
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