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

bitshifter / glam-rs / 24918269367

25 Apr 2026 12:40AM UTC coverage: 97.134%. Remained the same
24918269367

push

github

bitshifter
Add types are conditional.

57276 of 58966 relevant lines covered (97.13%)

3.48 hits per line

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

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

3
use crate::{BVec3, BVec3A, U16Vec3, U64Vec2, U64Vec4, U8Vec3, UVec3};
4

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

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

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

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

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

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

23
use core::fmt;
24
use core::iter::{Product, Sum};
25
use core::{f32, ops::*};
26

27
#[cfg(feature = "zerocopy")]
28
use zerocopy_derive::*;
29

30
/// Creates a 3-dimensional vector.
31
#[inline(always)]
32
#[must_use]
33
pub const fn u64vec3(x: u64, y: u64, z: u64) -> U64Vec3 {
6✔
34
    U64Vec3::new(x, y, z)
×
35
}
36

37
/// A 3-dimensional vector.
38
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
39
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
40
#[cfg_attr(
41
    feature = "zerocopy",
42
    derive(FromBytes, Immutable, IntoBytes, KnownLayout)
43
)]
44
#[repr(C)]
45
#[cfg_attr(target_arch = "spirv", rust_gpu::vector::v1)]
46
pub struct U64Vec3 {
47
    pub x: u64,
48
    pub y: u64,
49
    pub z: u64,
50
}
51

52
impl U64Vec3 {
53
    /// All zeroes.
54
    pub const ZERO: Self = Self::splat(0);
55

56
    /// All ones.
57
    pub const ONE: Self = Self::splat(1);
58

59
    /// All `u64::MIN`.
60
    pub const MIN: Self = Self::splat(u64::MIN);
61

62
    /// All `u64::MAX`.
63
    pub const MAX: Self = Self::splat(u64::MAX);
64

65
    /// A unit vector pointing along the positive X axis.
66
    pub const X: Self = Self::new(1, 0, 0);
67

68
    /// A unit vector pointing along the positive Y axis.
69
    pub const Y: Self = Self::new(0, 1, 0);
70

71
    /// A unit vector pointing along the positive Z axis.
72
    pub const Z: Self = Self::new(0, 0, 1);
73

74
    /// The unit axes.
75
    pub const AXES: [Self; 3] = [Self::X, Self::Y, Self::Z];
76

77
    /// Creates a new vector.
78
    #[inline(always)]
79
    #[must_use]
80
    pub const fn new(x: u64, y: u64, z: u64) -> Self {
15✔
81
        Self { x, y, z }
82
    }
83

84
    /// Creates a vector with all elements set to `v`.
85
    #[inline]
86
    #[must_use]
87
    pub const fn splat(v: u64) -> Self {
3✔
88
        Self { x: v, y: v, z: v }
89
    }
90

91
    /// Returns a vector containing each element of `self` modified by a mapping function `f`.
92
    #[inline]
93
    #[must_use]
94
    pub fn map<F>(self, f: F) -> Self
6✔
95
    where
96
        F: Fn(u64) -> u64,
97
    {
98
        Self::new(f(self.x), f(self.y), f(self.z))
12✔
99
    }
100

101
    /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
102
    /// for each element of `self`.
103
    ///
104
    /// A true element in the mask uses the corresponding element from `if_true`, and false
105
    /// uses the element from `if_false`.
106
    #[inline]
107
    #[must_use]
108
    pub fn select(mask: BVec3, if_true: Self, if_false: Self) -> Self {
3✔
109
        Self {
110
            x: if mask.test(0) { if_true.x } else { if_false.x },
3✔
111
            y: if mask.test(1) { if_true.y } else { if_false.y },
3✔
112
            z: if mask.test(2) { if_true.z } else { if_false.z },
3✔
113
        }
114
    }
115

116
    /// Creates a new vector from an array.
117
    #[inline]
118
    #[must_use]
119
    pub const fn from_array(a: [u64; 3]) -> Self {
×
120
        Self::new(a[0], a[1], a[2])
×
121
    }
122

123
    /// Converts `self` to `[x, y, z]`
124
    #[inline]
125
    #[must_use]
126
    pub const fn to_array(&self) -> [u64; 3] {
3✔
127
        [self.x, self.y, self.z]
3✔
128
    }
129

130
    /// Creates a vector from the first 3 values in `slice`.
131
    ///
132
    /// # Panics
133
    ///
134
    /// Panics if `slice` is less than 3 elements long.
135
    #[inline]
136
    #[must_use]
137
    pub const fn from_slice(slice: &[u64]) -> Self {
3✔
138
        assert!(slice.len() >= 3);
3✔
139
        Self::new(slice[0], slice[1], slice[2])
3✔
140
    }
141

142
    /// Writes the elements of `self` to the first 3 elements in `slice`.
143
    ///
144
    /// # Panics
145
    ///
146
    /// Panics if `slice` is less than 3 elements long.
147
    #[inline]
148
    pub fn write_to_slice(self, slice: &mut [u64]) {
3✔
149
        slice[..3].copy_from_slice(&self.to_array());
3✔
150
    }
151

152
    /// Internal method for creating a 3D vector from a 4D vector, discarding `w`.
153
    #[allow(dead_code)]
154
    #[inline]
155
    #[must_use]
156
    pub(crate) fn from_vec4(v: U64Vec4) -> Self {
×
157
        Self {
158
            x: v.x,
×
159
            y: v.y,
×
160
            z: v.z,
×
161
        }
162
    }
163

164
    /// Creates a 4D vector from `self` and the given `w` value.
165
    #[inline]
166
    #[must_use]
167
    pub fn extend(self, w: u64) -> U64Vec4 {
3✔
168
        U64Vec4::new(self.x, self.y, self.z, w)
3✔
169
    }
170

171
    /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.
172
    ///
173
    /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].
174
    #[inline]
175
    #[must_use]
176
    pub fn truncate(self) -> U64Vec2 {
×
177
        use crate::swizzles::Vec3Swizzles;
178
        self.xy()
×
179
    }
180

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

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

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

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

212
    /// Returns a vector where every component is the dot product of `self` and `rhs`.
213
    #[inline]
214
    #[must_use]
215
    pub fn dot_into_vec(self, rhs: Self) -> Self {
3✔
216
        Self::splat(self.dot(rhs))
3✔
217
    }
218

219
    /// Computes the cross product of `self` and `rhs`.
220
    #[inline]
221
    #[must_use]
222
    pub fn cross(self, rhs: Self) -> Self {
3✔
223
        Self {
224
            x: self.y * rhs.z - rhs.y * self.z,
3✔
225
            y: self.z * rhs.x - rhs.z * self.x,
6✔
226
            z: self.x * rhs.y - rhs.x * self.y,
6✔
227
        }
228
    }
229

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

243
    /// Returns a vector containing the maximum values for each element of `self` and `rhs`.
244
    ///
245
    /// In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.
246
    #[inline]
247
    #[must_use]
248
    pub fn max(self, rhs: Self) -> Self {
3✔
249
        Self {
250
            x: if self.x > rhs.x { self.x } else { rhs.x },
3✔
251
            y: if self.y > rhs.y { self.y } else { rhs.y },
3✔
252
            z: if self.z > rhs.z { self.z } else { rhs.z },
3✔
253
        }
254
    }
255

256
    /// Component-wise clamping of values, similar to [`u64::clamp`].
257
    ///
258
    /// Each element in `min` must be less-or-equal to the corresponding element in `max`.
259
    ///
260
    /// # Panics
261
    ///
262
    /// Will panic if `min` is greater than `max` when `glam_assert` is enabled.
263
    #[inline]
264
    #[must_use]
265
    pub fn clamp(self, min: Self, max: Self) -> Self {
3✔
266
        glam_assert!(min.cmple(max).all(), "clamp: expected min <= max");
3✔
267
        self.max(min).min(max)
3✔
268
    }
269

270
    /// Returns the horizontal minimum of `self`.
271
    ///
272
    /// In other words this computes `min(x, y, ..)`.
273
    #[inline]
274
    #[must_use]
275
    pub fn min_element(self) -> u64 {
6✔
276
        let min = |a, b| if a < b { a } else { b };
12✔
277
        min(self.x, min(self.y, self.z))
6✔
278
    }
279

280
    /// Returns the horizontal maximum of `self`.
281
    ///
282
    /// In other words this computes `max(x, y, ..)`.
283
    #[inline]
284
    #[must_use]
285
    pub fn max_element(self) -> u64 {
6✔
286
        let max = |a, b| if a > b { a } else { b };
12✔
287
        max(self.x, max(self.y, self.z))
6✔
288
    }
289

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

307
    /// Returns the index of the first maximum element of `self`.
308
    #[doc(alias = "argmax")]
309
    #[inline]
310
    #[must_use]
311
    pub fn max_position(self) -> usize {
3✔
312
        let mut max = self.x;
3✔
313
        let mut index = 0;
3✔
314
        if self.y > max {
6✔
315
            max = self.y;
3✔
316
            index = 1;
3✔
317
        }
318
        if self.z > max {
6✔
319
            index = 2;
3✔
320
        }
321
        index
3✔
322
    }
323

324
    /// Returns the sum of all elements of `self`.
325
    ///
326
    /// In other words, this computes `self.x + self.y + ..`.
327
    #[inline]
328
    #[must_use]
329
    pub fn element_sum(self) -> u64 {
3✔
330
        self.x + self.y + self.z
3✔
331
    }
332

333
    /// Returns the product 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_product(self) -> u64 {
3✔
339
        self.x * self.y * self.z
3✔
340
    }
341

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

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

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

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

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

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

408
    /// Computes the squared length of `self`.
409
    #[doc(alias = "magnitude2")]
410
    #[inline]
411
    #[must_use]
412
    pub fn length_squared(self) -> u64 {
3✔
413
        self.dot(self)
3✔
414
    }
415

416
    /// Computes the [manhattan distance] between two points.
417
    ///
418
    /// # Overflow
419
    /// This method may overflow if the result is greater than [`u64::MAX`].
420
    ///
421
    /// See also [`checked_manhattan_distance`][U64Vec3::checked_manhattan_distance].
422
    ///
423
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
424
    #[inline]
425
    #[must_use]
426
    pub fn manhattan_distance(self, rhs: Self) -> u64 {
3✔
427
        self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
3✔
428
    }
429

430
    /// Computes the [manhattan distance] between two points.
431
    ///
432
    /// This will returns [`None`] if the result is greater than [`u64::MAX`].
433
    ///
434
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
435
    #[inline]
436
    #[must_use]
437
    pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
3✔
438
        let d = self.x.abs_diff(rhs.x);
3✔
439
        let d = d.checked_add(self.y.abs_diff(rhs.y))?;
3✔
440
        d.checked_add(self.z.abs_diff(rhs.z))
3✔
441
    }
442

443
    /// Computes the [chebyshev distance] between two points.
444
    ///
445
    /// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
446
    #[inline]
447
    #[must_use]
448
    pub fn chebyshev_distance(self, rhs: Self) -> u64 {
3✔
449
        // Note: the compiler will eventually optimize out the loop
450
        [
451
            self.x.abs_diff(rhs.x),
3✔
452
            self.y.abs_diff(rhs.y),
3✔
453
            self.z.abs_diff(rhs.z),
3✔
454
        ]
455
        .into_iter()
456
        .max()
457
        .unwrap()
458
    }
459

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

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

474
    /// Casts all elements of `self` to `f64`.
475
    #[cfg(feature = "f64")]
476
    #[inline]
477
    #[must_use]
478
    pub fn as_dvec3(self) -> crate::DVec3 {
3✔
479
        crate::DVec3::new(self.x as f64, self.y as f64, self.z as f64)
3✔
480
    }
481

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

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

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

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

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

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

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

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

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

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

573
        Some(Self { x, y, z })
3✔
574
    }
575

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

595
        Some(Self { x, y, z })
3✔
596
    }
597

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

617
        Some(Self { x, y, z })
3✔
618
    }
619

620
    /// Returns a vector containing the wrapping division of `self` and `rhs`.
621
    ///
622
    /// In other words this computes `Some([self.x / rhs.x, self.y / rhs.y, ..])` but returns `None` on any division by zero.
623
    #[inline]
624
    #[must_use]
625
    pub const fn checked_div(self, rhs: Self) -> Option<Self> {
3✔
626
        let x = match self.x.checked_div(rhs.x) {
3✔
627
            Some(v) => v,
3✔
628
            None => return None,
3✔
629
        };
630
        let y = match self.y.checked_div(rhs.y) {
3✔
631
            Some(v) => v,
3✔
632
            None => return None,
3✔
633
        };
634
        let z = match self.z.checked_div(rhs.z) {
3✔
635
            Some(v) => v,
3✔
636
            None => return None,
×
637
        };
638

639
        Some(Self { x, y, z })
3✔
640
    }
641

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

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

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

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

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

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

720
    /// Returns a vector containing the saturating multiplication of `self` and `rhs`.
721
    ///
722
    /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.
723
    #[inline]
724
    #[must_use]
725
    pub const fn saturating_mul(self, rhs: Self) -> Self {
3✔
726
        Self {
727
            x: self.x.saturating_mul(rhs.x),
3✔
728
            y: self.y.saturating_mul(rhs.y),
3✔
729
            z: self.z.saturating_mul(rhs.z),
3✔
730
        }
731
    }
732

733
    /// Returns a vector containing the saturating division of `self` and `rhs`.
734
    ///
735
    /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.
736
    #[inline]
737
    #[must_use]
738
    pub const fn saturating_div(self, rhs: Self) -> Self {
3✔
739
        Self {
740
            x: self.x.saturating_div(rhs.x),
3✔
741
            y: self.y.saturating_div(rhs.y),
3✔
742
            z: self.z.saturating_div(rhs.z),
3✔
743
        }
744
    }
745

746
    /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.
747
    ///
748
    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
749

750
    #[cfg(feature = "i64")]
751
    #[inline]
752
    #[must_use]
753
    pub const fn checked_add_signed(self, rhs: I64Vec3) -> Option<Self> {
3✔
754
        let x = match self.x.checked_add_signed(rhs.x) {
3✔
755
            Some(v) => v,
3✔
756
            None => return None,
3✔
757
        };
758
        let y = match self.y.checked_add_signed(rhs.y) {
3✔
759
            Some(v) => v,
3✔
760
            None => return None,
×
761
        };
762
        let z = match self.z.checked_add_signed(rhs.z) {
3✔
763
            Some(v) => v,
3✔
764
            None => return None,
×
765
        };
766

767
        Some(Self { x, y, z })
3✔
768
    }
769

770
    /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.
771
    ///
772
    /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.
773

774
    #[cfg(feature = "i64")]
775
    #[inline]
776
    #[must_use]
777
    pub const fn wrapping_add_signed(self, rhs: I64Vec3) -> Self {
3✔
778
        Self {
779
            x: self.x.wrapping_add_signed(rhs.x),
3✔
780
            y: self.y.wrapping_add_signed(rhs.y),
3✔
781
            z: self.z.wrapping_add_signed(rhs.z),
3✔
782
        }
783
    }
784

785
    /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`.
786
    ///
787
    /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.
788

789
    #[cfg(feature = "i64")]
790
    #[inline]
791
    #[must_use]
792
    pub const fn saturating_add_signed(self, rhs: I64Vec3) -> Self {
3✔
793
        Self {
794
            x: self.x.saturating_add_signed(rhs.x),
3✔
795
            y: self.y.saturating_add_signed(rhs.y),
3✔
796
            z: self.z.saturating_add_signed(rhs.z),
3✔
797
        }
798
    }
799
}
800

801
impl Default for U64Vec3 {
802
    #[inline(always)]
803
    fn default() -> Self {
6✔
804
        Self::ZERO
6✔
805
    }
806
}
807

808
impl Div for U64Vec3 {
809
    type Output = Self;
810
    #[inline]
811
    fn div(self, rhs: Self) -> Self {
3✔
812
        Self {
813
            x: self.x.div(rhs.x),
3✔
814
            y: self.y.div(rhs.y),
3✔
815
            z: self.z.div(rhs.z),
3✔
816
        }
817
    }
818
}
819

820
impl Div<&Self> for U64Vec3 {
821
    type Output = Self;
822
    #[inline]
823
    fn div(self, rhs: &Self) -> Self {
3✔
824
        self.div(*rhs)
3✔
825
    }
826
}
827

828
impl Div<&U64Vec3> for &U64Vec3 {
829
    type Output = U64Vec3;
830
    #[inline]
831
    fn div(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
832
        (*self).div(*rhs)
3✔
833
    }
834
}
835

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

844
impl DivAssign for U64Vec3 {
845
    #[inline]
846
    fn div_assign(&mut self, rhs: Self) {
3✔
847
        self.x.div_assign(rhs.x);
3✔
848
        self.y.div_assign(rhs.y);
4✔
849
        self.z.div_assign(rhs.z);
4✔
850
    }
851
}
852

853
impl DivAssign<&Self> for U64Vec3 {
854
    #[inline]
855
    fn div_assign(&mut self, rhs: &Self) {
3✔
856
        self.div_assign(*rhs);
3✔
857
    }
858
}
859

860
impl Div<u64> for U64Vec3 {
861
    type Output = Self;
862
    #[inline]
863
    fn div(self, rhs: u64) -> Self {
6✔
864
        Self {
865
            x: self.x.div(rhs),
6✔
866
            y: self.y.div(rhs),
6✔
867
            z: self.z.div(rhs),
6✔
868
        }
869
    }
870
}
871

872
impl Div<&u64> for U64Vec3 {
873
    type Output = Self;
874
    #[inline]
875
    fn div(self, rhs: &u64) -> Self {
3✔
876
        self.div(*rhs)
3✔
877
    }
878
}
879

880
impl Div<&u64> for &U64Vec3 {
881
    type Output = U64Vec3;
882
    #[inline]
883
    fn div(self, rhs: &u64) -> U64Vec3 {
3✔
884
        (*self).div(*rhs)
3✔
885
    }
886
}
887

888
impl Div<u64> for &U64Vec3 {
889
    type Output = U64Vec3;
890
    #[inline]
891
    fn div(self, rhs: u64) -> U64Vec3 {
3✔
892
        (*self).div(rhs)
3✔
893
    }
894
}
895

896
impl DivAssign<u64> for U64Vec3 {
897
    #[inline]
898
    fn div_assign(&mut self, rhs: u64) {
3✔
899
        self.x.div_assign(rhs);
3✔
900
        self.y.div_assign(rhs);
4✔
901
        self.z.div_assign(rhs);
4✔
902
    }
903
}
904

905
impl DivAssign<&u64> for U64Vec3 {
906
    #[inline]
907
    fn div_assign(&mut self, rhs: &u64) {
3✔
908
        self.div_assign(*rhs);
3✔
909
    }
910
}
911

912
impl Div<U64Vec3> for u64 {
913
    type Output = U64Vec3;
914
    #[inline]
915
    fn div(self, rhs: U64Vec3) -> U64Vec3 {
3✔
916
        U64Vec3 {
917
            x: self.div(rhs.x),
3✔
918
            y: self.div(rhs.y),
3✔
919
            z: self.div(rhs.z),
3✔
920
        }
921
    }
922
}
923

924
impl Div<&U64Vec3> for u64 {
925
    type Output = U64Vec3;
926
    #[inline]
927
    fn div(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
928
        self.div(*rhs)
3✔
929
    }
930
}
931

932
impl Div<&U64Vec3> for &u64 {
933
    type Output = U64Vec3;
934
    #[inline]
935
    fn div(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
936
        (*self).div(*rhs)
3✔
937
    }
938
}
939

940
impl Div<U64Vec3> for &u64 {
941
    type Output = U64Vec3;
942
    #[inline]
943
    fn div(self, rhs: U64Vec3) -> U64Vec3 {
3✔
944
        (*self).div(rhs)
3✔
945
    }
946
}
947

948
impl Mul for U64Vec3 {
949
    type Output = Self;
950
    #[inline]
951
    fn mul(self, rhs: Self) -> Self {
3✔
952
        Self {
953
            x: self.x.mul(rhs.x),
3✔
954
            y: self.y.mul(rhs.y),
3✔
955
            z: self.z.mul(rhs.z),
3✔
956
        }
957
    }
958
}
959

960
impl Mul<&Self> for U64Vec3 {
961
    type Output = Self;
962
    #[inline]
963
    fn mul(self, rhs: &Self) -> Self {
3✔
964
        self.mul(*rhs)
3✔
965
    }
966
}
967

968
impl Mul<&U64Vec3> for &U64Vec3 {
969
    type Output = U64Vec3;
970
    #[inline]
971
    fn mul(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
972
        (*self).mul(*rhs)
3✔
973
    }
974
}
975

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

984
impl MulAssign for U64Vec3 {
985
    #[inline]
986
    fn mul_assign(&mut self, rhs: Self) {
3✔
987
        self.x.mul_assign(rhs.x);
3✔
988
        self.y.mul_assign(rhs.y);
4✔
989
        self.z.mul_assign(rhs.z);
4✔
990
    }
991
}
992

993
impl MulAssign<&Self> for U64Vec3 {
994
    #[inline]
995
    fn mul_assign(&mut self, rhs: &Self) {
3✔
996
        self.mul_assign(*rhs);
3✔
997
    }
998
}
999

1000
impl Mul<u64> for U64Vec3 {
1001
    type Output = Self;
1002
    #[inline]
1003
    fn mul(self, rhs: u64) -> Self {
3✔
1004
        Self {
1005
            x: self.x.mul(rhs),
3✔
1006
            y: self.y.mul(rhs),
3✔
1007
            z: self.z.mul(rhs),
3✔
1008
        }
1009
    }
1010
}
1011

1012
impl Mul<&u64> for U64Vec3 {
1013
    type Output = Self;
1014
    #[inline]
1015
    fn mul(self, rhs: &u64) -> Self {
3✔
1016
        self.mul(*rhs)
3✔
1017
    }
1018
}
1019

1020
impl Mul<&u64> for &U64Vec3 {
1021
    type Output = U64Vec3;
1022
    #[inline]
1023
    fn mul(self, rhs: &u64) -> U64Vec3 {
3✔
1024
        (*self).mul(*rhs)
3✔
1025
    }
1026
}
1027

1028
impl Mul<u64> for &U64Vec3 {
1029
    type Output = U64Vec3;
1030
    #[inline]
1031
    fn mul(self, rhs: u64) -> U64Vec3 {
3✔
1032
        (*self).mul(rhs)
3✔
1033
    }
1034
}
1035

1036
impl MulAssign<u64> for U64Vec3 {
1037
    #[inline]
1038
    fn mul_assign(&mut self, rhs: u64) {
3✔
1039
        self.x.mul_assign(rhs);
3✔
1040
        self.y.mul_assign(rhs);
4✔
1041
        self.z.mul_assign(rhs);
4✔
1042
    }
1043
}
1044

1045
impl MulAssign<&u64> for U64Vec3 {
1046
    #[inline]
1047
    fn mul_assign(&mut self, rhs: &u64) {
3✔
1048
        self.mul_assign(*rhs);
3✔
1049
    }
1050
}
1051

1052
impl Mul<U64Vec3> for u64 {
1053
    type Output = U64Vec3;
1054
    #[inline]
1055
    fn mul(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1056
        U64Vec3 {
1057
            x: self.mul(rhs.x),
3✔
1058
            y: self.mul(rhs.y),
3✔
1059
            z: self.mul(rhs.z),
3✔
1060
        }
1061
    }
1062
}
1063

1064
impl Mul<&U64Vec3> for u64 {
1065
    type Output = U64Vec3;
1066
    #[inline]
1067
    fn mul(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1068
        self.mul(*rhs)
3✔
1069
    }
1070
}
1071

1072
impl Mul<&U64Vec3> for &u64 {
1073
    type Output = U64Vec3;
1074
    #[inline]
1075
    fn mul(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1076
        (*self).mul(*rhs)
3✔
1077
    }
1078
}
1079

1080
impl Mul<U64Vec3> for &u64 {
1081
    type Output = U64Vec3;
1082
    #[inline]
1083
    fn mul(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1084
        (*self).mul(rhs)
3✔
1085
    }
1086
}
1087

1088
impl Add for U64Vec3 {
1089
    type Output = Self;
1090
    #[inline]
1091
    fn add(self, rhs: Self) -> Self {
3✔
1092
        Self {
1093
            x: self.x.add(rhs.x),
3✔
1094
            y: self.y.add(rhs.y),
4✔
1095
            z: self.z.add(rhs.z),
4✔
1096
        }
1097
    }
1098
}
1099

1100
impl Add<&Self> for U64Vec3 {
1101
    type Output = Self;
1102
    #[inline]
1103
    fn add(self, rhs: &Self) -> Self {
3✔
1104
        self.add(*rhs)
3✔
1105
    }
1106
}
1107

1108
impl Add<&U64Vec3> for &U64Vec3 {
1109
    type Output = U64Vec3;
1110
    #[inline]
1111
    fn add(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1112
        (*self).add(*rhs)
3✔
1113
    }
1114
}
1115

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

1124
impl AddAssign for U64Vec3 {
1125
    #[inline]
1126
    fn add_assign(&mut self, rhs: Self) {
3✔
1127
        self.x.add_assign(rhs.x);
3✔
1128
        self.y.add_assign(rhs.y);
4✔
1129
        self.z.add_assign(rhs.z);
4✔
1130
    }
1131
}
1132

1133
impl AddAssign<&Self> for U64Vec3 {
1134
    #[inline]
1135
    fn add_assign(&mut self, rhs: &Self) {
3✔
1136
        self.add_assign(*rhs);
3✔
1137
    }
1138
}
1139

1140
impl Add<u64> for U64Vec3 {
1141
    type Output = Self;
1142
    #[inline]
1143
    fn add(self, rhs: u64) -> Self {
3✔
1144
        Self {
1145
            x: self.x.add(rhs),
3✔
1146
            y: self.y.add(rhs),
3✔
1147
            z: self.z.add(rhs),
3✔
1148
        }
1149
    }
1150
}
1151

1152
impl Add<&u64> for U64Vec3 {
1153
    type Output = Self;
1154
    #[inline]
1155
    fn add(self, rhs: &u64) -> Self {
3✔
1156
        self.add(*rhs)
3✔
1157
    }
1158
}
1159

1160
impl Add<&u64> for &U64Vec3 {
1161
    type Output = U64Vec3;
1162
    #[inline]
1163
    fn add(self, rhs: &u64) -> U64Vec3 {
3✔
1164
        (*self).add(*rhs)
3✔
1165
    }
1166
}
1167

1168
impl Add<u64> for &U64Vec3 {
1169
    type Output = U64Vec3;
1170
    #[inline]
1171
    fn add(self, rhs: u64) -> U64Vec3 {
3✔
1172
        (*self).add(rhs)
3✔
1173
    }
1174
}
1175

1176
impl AddAssign<u64> for U64Vec3 {
1177
    #[inline]
1178
    fn add_assign(&mut self, rhs: u64) {
3✔
1179
        self.x.add_assign(rhs);
3✔
1180
        self.y.add_assign(rhs);
3✔
1181
        self.z.add_assign(rhs);
3✔
1182
    }
1183
}
1184

1185
impl AddAssign<&u64> for U64Vec3 {
1186
    #[inline]
1187
    fn add_assign(&mut self, rhs: &u64) {
3✔
1188
        self.add_assign(*rhs);
3✔
1189
    }
1190
}
1191

1192
impl Add<U64Vec3> for u64 {
1193
    type Output = U64Vec3;
1194
    #[inline]
1195
    fn add(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1196
        U64Vec3 {
1197
            x: self.add(rhs.x),
3✔
1198
            y: self.add(rhs.y),
3✔
1199
            z: self.add(rhs.z),
3✔
1200
        }
1201
    }
1202
}
1203

1204
impl Add<&U64Vec3> for u64 {
1205
    type Output = U64Vec3;
1206
    #[inline]
1207
    fn add(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1208
        self.add(*rhs)
3✔
1209
    }
1210
}
1211

1212
impl Add<&U64Vec3> for &u64 {
1213
    type Output = U64Vec3;
1214
    #[inline]
1215
    fn add(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1216
        (*self).add(*rhs)
3✔
1217
    }
1218
}
1219

1220
impl Add<U64Vec3> for &u64 {
1221
    type Output = U64Vec3;
1222
    #[inline]
1223
    fn add(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1224
        (*self).add(rhs)
3✔
1225
    }
1226
}
1227

1228
impl Sub for U64Vec3 {
1229
    type Output = Self;
1230
    #[inline]
1231
    fn sub(self, rhs: Self) -> Self {
3✔
1232
        Self {
1233
            x: self.x.sub(rhs.x),
3✔
1234
            y: self.y.sub(rhs.y),
3✔
1235
            z: self.z.sub(rhs.z),
3✔
1236
        }
1237
    }
1238
}
1239

1240
impl Sub<&Self> for U64Vec3 {
1241
    type Output = Self;
1242
    #[inline]
1243
    fn sub(self, rhs: &Self) -> Self {
3✔
1244
        self.sub(*rhs)
3✔
1245
    }
1246
}
1247

1248
impl Sub<&U64Vec3> for &U64Vec3 {
1249
    type Output = U64Vec3;
1250
    #[inline]
1251
    fn sub(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1252
        (*self).sub(*rhs)
3✔
1253
    }
1254
}
1255

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

1264
impl SubAssign for U64Vec3 {
1265
    #[inline]
1266
    fn sub_assign(&mut self, rhs: Self) {
3✔
1267
        self.x.sub_assign(rhs.x);
3✔
1268
        self.y.sub_assign(rhs.y);
4✔
1269
        self.z.sub_assign(rhs.z);
4✔
1270
    }
1271
}
1272

1273
impl SubAssign<&Self> for U64Vec3 {
1274
    #[inline]
1275
    fn sub_assign(&mut self, rhs: &Self) {
3✔
1276
        self.sub_assign(*rhs);
3✔
1277
    }
1278
}
1279

1280
impl Sub<u64> for U64Vec3 {
1281
    type Output = Self;
1282
    #[inline]
1283
    fn sub(self, rhs: u64) -> Self {
3✔
1284
        Self {
1285
            x: self.x.sub(rhs),
3✔
1286
            y: self.y.sub(rhs),
3✔
1287
            z: self.z.sub(rhs),
3✔
1288
        }
1289
    }
1290
}
1291

1292
impl Sub<&u64> for U64Vec3 {
1293
    type Output = Self;
1294
    #[inline]
1295
    fn sub(self, rhs: &u64) -> Self {
3✔
1296
        self.sub(*rhs)
3✔
1297
    }
1298
}
1299

1300
impl Sub<&u64> for &U64Vec3 {
1301
    type Output = U64Vec3;
1302
    #[inline]
1303
    fn sub(self, rhs: &u64) -> U64Vec3 {
3✔
1304
        (*self).sub(*rhs)
3✔
1305
    }
1306
}
1307

1308
impl Sub<u64> for &U64Vec3 {
1309
    type Output = U64Vec3;
1310
    #[inline]
1311
    fn sub(self, rhs: u64) -> U64Vec3 {
3✔
1312
        (*self).sub(rhs)
3✔
1313
    }
1314
}
1315

1316
impl SubAssign<u64> for U64Vec3 {
1317
    #[inline]
1318
    fn sub_assign(&mut self, rhs: u64) {
3✔
1319
        self.x.sub_assign(rhs);
3✔
1320
        self.y.sub_assign(rhs);
3✔
1321
        self.z.sub_assign(rhs);
3✔
1322
    }
1323
}
1324

1325
impl SubAssign<&u64> for U64Vec3 {
1326
    #[inline]
1327
    fn sub_assign(&mut self, rhs: &u64) {
3✔
1328
        self.sub_assign(*rhs);
3✔
1329
    }
1330
}
1331

1332
impl Sub<U64Vec3> for u64 {
1333
    type Output = U64Vec3;
1334
    #[inline]
1335
    fn sub(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1336
        U64Vec3 {
1337
            x: self.sub(rhs.x),
3✔
1338
            y: self.sub(rhs.y),
3✔
1339
            z: self.sub(rhs.z),
3✔
1340
        }
1341
    }
1342
}
1343

1344
impl Sub<&U64Vec3> for u64 {
1345
    type Output = U64Vec3;
1346
    #[inline]
1347
    fn sub(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1348
        self.sub(*rhs)
3✔
1349
    }
1350
}
1351

1352
impl Sub<&U64Vec3> for &u64 {
1353
    type Output = U64Vec3;
1354
    #[inline]
1355
    fn sub(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1356
        (*self).sub(*rhs)
3✔
1357
    }
1358
}
1359

1360
impl Sub<U64Vec3> for &u64 {
1361
    type Output = U64Vec3;
1362
    #[inline]
1363
    fn sub(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1364
        (*self).sub(rhs)
3✔
1365
    }
1366
}
1367

1368
impl Rem for U64Vec3 {
1369
    type Output = Self;
1370
    #[inline]
1371
    fn rem(self, rhs: Self) -> Self {
3✔
1372
        Self {
1373
            x: self.x.rem(rhs.x),
3✔
1374
            y: self.y.rem(rhs.y),
3✔
1375
            z: self.z.rem(rhs.z),
3✔
1376
        }
1377
    }
1378
}
1379

1380
impl Rem<&Self> for U64Vec3 {
1381
    type Output = Self;
1382
    #[inline]
1383
    fn rem(self, rhs: &Self) -> Self {
3✔
1384
        self.rem(*rhs)
3✔
1385
    }
1386
}
1387

1388
impl Rem<&U64Vec3> for &U64Vec3 {
1389
    type Output = U64Vec3;
1390
    #[inline]
1391
    fn rem(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1392
        (*self).rem(*rhs)
3✔
1393
    }
1394
}
1395

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

1404
impl RemAssign for U64Vec3 {
1405
    #[inline]
1406
    fn rem_assign(&mut self, rhs: Self) {
3✔
1407
        self.x.rem_assign(rhs.x);
3✔
1408
        self.y.rem_assign(rhs.y);
4✔
1409
        self.z.rem_assign(rhs.z);
4✔
1410
    }
1411
}
1412

1413
impl RemAssign<&Self> for U64Vec3 {
1414
    #[inline]
1415
    fn rem_assign(&mut self, rhs: &Self) {
3✔
1416
        self.rem_assign(*rhs);
3✔
1417
    }
1418
}
1419

1420
impl Rem<u64> for U64Vec3 {
1421
    type Output = Self;
1422
    #[inline]
1423
    fn rem(self, rhs: u64) -> Self {
3✔
1424
        Self {
1425
            x: self.x.rem(rhs),
3✔
1426
            y: self.y.rem(rhs),
3✔
1427
            z: self.z.rem(rhs),
3✔
1428
        }
1429
    }
1430
}
1431

1432
impl Rem<&u64> for U64Vec3 {
1433
    type Output = Self;
1434
    #[inline]
1435
    fn rem(self, rhs: &u64) -> Self {
3✔
1436
        self.rem(*rhs)
3✔
1437
    }
1438
}
1439

1440
impl Rem<&u64> for &U64Vec3 {
1441
    type Output = U64Vec3;
1442
    #[inline]
1443
    fn rem(self, rhs: &u64) -> U64Vec3 {
3✔
1444
        (*self).rem(*rhs)
3✔
1445
    }
1446
}
1447

1448
impl Rem<u64> for &U64Vec3 {
1449
    type Output = U64Vec3;
1450
    #[inline]
1451
    fn rem(self, rhs: u64) -> U64Vec3 {
3✔
1452
        (*self).rem(rhs)
3✔
1453
    }
1454
}
1455

1456
impl RemAssign<u64> for U64Vec3 {
1457
    #[inline]
1458
    fn rem_assign(&mut self, rhs: u64) {
3✔
1459
        self.x.rem_assign(rhs);
3✔
1460
        self.y.rem_assign(rhs);
4✔
1461
        self.z.rem_assign(rhs);
4✔
1462
    }
1463
}
1464

1465
impl RemAssign<&u64> for U64Vec3 {
1466
    #[inline]
1467
    fn rem_assign(&mut self, rhs: &u64) {
3✔
1468
        self.rem_assign(*rhs);
3✔
1469
    }
1470
}
1471

1472
impl Rem<U64Vec3> for u64 {
1473
    type Output = U64Vec3;
1474
    #[inline]
1475
    fn rem(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1476
        U64Vec3 {
1477
            x: self.rem(rhs.x),
3✔
1478
            y: self.rem(rhs.y),
3✔
1479
            z: self.rem(rhs.z),
3✔
1480
        }
1481
    }
1482
}
1483

1484
impl Rem<&U64Vec3> for u64 {
1485
    type Output = U64Vec3;
1486
    #[inline]
1487
    fn rem(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1488
        self.rem(*rhs)
3✔
1489
    }
1490
}
1491

1492
impl Rem<&U64Vec3> for &u64 {
1493
    type Output = U64Vec3;
1494
    #[inline]
1495
    fn rem(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1496
        (*self).rem(*rhs)
3✔
1497
    }
1498
}
1499

1500
impl Rem<U64Vec3> for &u64 {
1501
    type Output = U64Vec3;
1502
    #[inline]
1503
    fn rem(self, rhs: U64Vec3) -> U64Vec3 {
3✔
1504
        (*self).rem(rhs)
3✔
1505
    }
1506
}
1507

1508
impl AsRef<[u64; 3]> for U64Vec3 {
1509
    #[inline]
1510
    fn as_ref(&self) -> &[u64; 3] {
3✔
1511
        unsafe { &*(self as *const Self as *const [u64; 3]) }
3✔
1512
    }
1513
}
1514

1515
impl AsMut<[u64; 3]> for U64Vec3 {
1516
    #[inline]
1517
    fn as_mut(&mut self) -> &mut [u64; 3] {
3✔
1518
        unsafe { &mut *(self as *mut Self as *mut [u64; 3]) }
3✔
1519
    }
1520
}
1521

1522
impl Sum for U64Vec3 {
1523
    #[inline]
1524
    fn sum<I>(iter: I) -> Self
3✔
1525
    where
1526
        I: Iterator<Item = Self>,
1527
    {
1528
        iter.fold(Self::ZERO, Self::add)
3✔
1529
    }
1530
}
1531

1532
impl<'a> Sum<&'a Self> for U64Vec3 {
1533
    #[inline]
1534
    fn sum<I>(iter: I) -> Self
3✔
1535
    where
1536
        I: Iterator<Item = &'a Self>,
1537
    {
1538
        iter.fold(Self::ZERO, |a, &b| Self::add(a, b))
9✔
1539
    }
1540
}
1541

1542
impl Product for U64Vec3 {
1543
    #[inline]
1544
    fn product<I>(iter: I) -> Self
3✔
1545
    where
1546
        I: Iterator<Item = Self>,
1547
    {
1548
        iter.fold(Self::ONE, Self::mul)
3✔
1549
    }
1550
}
1551

1552
impl<'a> Product<&'a Self> for U64Vec3 {
1553
    #[inline]
1554
    fn product<I>(iter: I) -> Self
3✔
1555
    where
1556
        I: Iterator<Item = &'a Self>,
1557
    {
1558
        iter.fold(Self::ONE, |a, &b| Self::mul(a, b))
9✔
1559
    }
1560
}
1561

1562
impl Not for U64Vec3 {
1563
    type Output = Self;
1564
    #[inline]
1565
    fn not(self) -> Self {
3✔
1566
        Self {
1567
            x: self.x.not(),
3✔
1568
            y: self.y.not(),
3✔
1569
            z: self.z.not(),
3✔
1570
        }
1571
    }
1572
}
1573

1574
impl Not for &U64Vec3 {
1575
    type Output = U64Vec3;
1576
    #[inline]
1577
    fn not(self) -> U64Vec3 {
3✔
1578
        (*self).not()
3✔
1579
    }
1580
}
1581

1582
impl BitAnd for U64Vec3 {
1583
    type Output = Self;
1584
    #[inline]
1585
    fn bitand(self, rhs: Self) -> Self::Output {
3✔
1586
        Self {
1587
            x: self.x.bitand(rhs.x),
3✔
1588
            y: self.y.bitand(rhs.y),
3✔
1589
            z: self.z.bitand(rhs.z),
3✔
1590
        }
1591
    }
1592
}
1593

1594
impl BitAnd<&Self> for U64Vec3 {
1595
    type Output = Self;
1596
    #[inline]
1597
    fn bitand(self, rhs: &Self) -> Self {
3✔
1598
        self.bitand(*rhs)
3✔
1599
    }
1600
}
1601

1602
impl BitAnd<&U64Vec3> for &U64Vec3 {
1603
    type Output = U64Vec3;
1604
    #[inline]
1605
    fn bitand(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1606
        (*self).bitand(*rhs)
3✔
1607
    }
1608
}
1609

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

1618
impl BitAndAssign for U64Vec3 {
1619
    #[inline]
1620
    fn bitand_assign(&mut self, rhs: Self) {
3✔
1621
        *self = self.bitand(rhs);
3✔
1622
    }
1623
}
1624

1625
impl BitAndAssign<&Self> for U64Vec3 {
1626
    #[inline]
1627
    fn bitand_assign(&mut self, rhs: &Self) {
3✔
1628
        self.bitand_assign(*rhs);
3✔
1629
    }
1630
}
1631

1632
impl BitOr for U64Vec3 {
1633
    type Output = Self;
1634
    #[inline]
1635
    fn bitor(self, rhs: Self) -> Self::Output {
3✔
1636
        Self {
1637
            x: self.x.bitor(rhs.x),
3✔
1638
            y: self.y.bitor(rhs.y),
3✔
1639
            z: self.z.bitor(rhs.z),
3✔
1640
        }
1641
    }
1642
}
1643

1644
impl BitOr<&Self> for U64Vec3 {
1645
    type Output = Self;
1646
    #[inline]
1647
    fn bitor(self, rhs: &Self) -> Self {
3✔
1648
        self.bitor(*rhs)
3✔
1649
    }
1650
}
1651

1652
impl BitOr<&U64Vec3> for &U64Vec3 {
1653
    type Output = U64Vec3;
1654
    #[inline]
1655
    fn bitor(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1656
        (*self).bitor(*rhs)
3✔
1657
    }
1658
}
1659

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

1668
impl BitOrAssign for U64Vec3 {
1669
    #[inline]
1670
    fn bitor_assign(&mut self, rhs: Self) {
3✔
1671
        *self = self.bitor(rhs);
3✔
1672
    }
1673
}
1674

1675
impl BitOrAssign<&Self> for U64Vec3 {
1676
    #[inline]
1677
    fn bitor_assign(&mut self, rhs: &Self) {
3✔
1678
        self.bitor_assign(*rhs);
3✔
1679
    }
1680
}
1681

1682
impl BitXor for U64Vec3 {
1683
    type Output = Self;
1684
    #[inline]
1685
    fn bitxor(self, rhs: Self) -> Self::Output {
3✔
1686
        Self {
1687
            x: self.x.bitxor(rhs.x),
3✔
1688
            y: self.y.bitxor(rhs.y),
3✔
1689
            z: self.z.bitxor(rhs.z),
3✔
1690
        }
1691
    }
1692
}
1693

1694
impl BitXor<&Self> for U64Vec3 {
1695
    type Output = Self;
1696
    #[inline]
1697
    fn bitxor(self, rhs: &Self) -> Self {
3✔
1698
        self.bitxor(*rhs)
3✔
1699
    }
1700
}
1701

1702
impl BitXor<&U64Vec3> for &U64Vec3 {
1703
    type Output = U64Vec3;
1704
    #[inline]
1705
    fn bitxor(self, rhs: &U64Vec3) -> U64Vec3 {
3✔
1706
        (*self).bitxor(*rhs)
3✔
1707
    }
1708
}
1709

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

1718
impl BitXorAssign for U64Vec3 {
1719
    #[inline]
1720
    fn bitxor_assign(&mut self, rhs: Self) {
3✔
1721
        *self = self.bitxor(rhs);
3✔
1722
    }
1723
}
1724

1725
impl BitXorAssign<&Self> for U64Vec3 {
1726
    #[inline]
1727
    fn bitxor_assign(&mut self, rhs: &Self) {
3✔
1728
        self.bitxor_assign(*rhs);
3✔
1729
    }
1730
}
1731

1732
impl BitAnd<u64> for U64Vec3 {
1733
    type Output = Self;
1734
    #[inline]
1735
    fn bitand(self, rhs: u64) -> Self::Output {
3✔
1736
        Self {
1737
            x: self.x.bitand(rhs),
3✔
1738
            y: self.y.bitand(rhs),
3✔
1739
            z: self.z.bitand(rhs),
3✔
1740
        }
1741
    }
1742
}
1743

1744
impl BitAnd<&u64> for U64Vec3 {
1745
    type Output = Self;
1746
    #[inline]
1747
    fn bitand(self, rhs: &u64) -> Self {
3✔
1748
        self.bitand(*rhs)
3✔
1749
    }
1750
}
1751

1752
impl BitAnd<&u64> for &U64Vec3 {
1753
    type Output = U64Vec3;
1754
    #[inline]
1755
    fn bitand(self, rhs: &u64) -> U64Vec3 {
3✔
1756
        (*self).bitand(*rhs)
3✔
1757
    }
1758
}
1759

1760
impl BitAnd<u64> for &U64Vec3 {
1761
    type Output = U64Vec3;
1762
    #[inline]
1763
    fn bitand(self, rhs: u64) -> U64Vec3 {
3✔
1764
        (*self).bitand(rhs)
3✔
1765
    }
1766
}
1767

1768
impl BitAndAssign<u64> for U64Vec3 {
1769
    #[inline]
1770
    fn bitand_assign(&mut self, rhs: u64) {
3✔
1771
        *self = self.bitand(rhs);
3✔
1772
    }
1773
}
1774

1775
impl BitAndAssign<&u64> for U64Vec3 {
1776
    #[inline]
1777
    fn bitand_assign(&mut self, rhs: &u64) {
3✔
1778
        self.bitand_assign(*rhs);
3✔
1779
    }
1780
}
1781

1782
impl BitOr<u64> for U64Vec3 {
1783
    type Output = Self;
1784
    #[inline]
1785
    fn bitor(self, rhs: u64) -> Self::Output {
3✔
1786
        Self {
1787
            x: self.x.bitor(rhs),
3✔
1788
            y: self.y.bitor(rhs),
3✔
1789
            z: self.z.bitor(rhs),
3✔
1790
        }
1791
    }
1792
}
1793

1794
impl BitOr<&u64> for U64Vec3 {
1795
    type Output = Self;
1796
    #[inline]
1797
    fn bitor(self, rhs: &u64) -> Self {
3✔
1798
        self.bitor(*rhs)
3✔
1799
    }
1800
}
1801

1802
impl BitOr<&u64> for &U64Vec3 {
1803
    type Output = U64Vec3;
1804
    #[inline]
1805
    fn bitor(self, rhs: &u64) -> U64Vec3 {
3✔
1806
        (*self).bitor(*rhs)
3✔
1807
    }
1808
}
1809

1810
impl BitOr<u64> for &U64Vec3 {
1811
    type Output = U64Vec3;
1812
    #[inline]
1813
    fn bitor(self, rhs: u64) -> U64Vec3 {
3✔
1814
        (*self).bitor(rhs)
3✔
1815
    }
1816
}
1817

1818
impl BitOrAssign<u64> for U64Vec3 {
1819
    #[inline]
1820
    fn bitor_assign(&mut self, rhs: u64) {
3✔
1821
        *self = self.bitor(rhs);
3✔
1822
    }
1823
}
1824

1825
impl BitOrAssign<&u64> for U64Vec3 {
1826
    #[inline]
1827
    fn bitor_assign(&mut self, rhs: &u64) {
3✔
1828
        self.bitor_assign(*rhs);
3✔
1829
    }
1830
}
1831

1832
impl BitXor<u64> for U64Vec3 {
1833
    type Output = Self;
1834
    #[inline]
1835
    fn bitxor(self, rhs: u64) -> Self::Output {
3✔
1836
        Self {
1837
            x: self.x.bitxor(rhs),
3✔
1838
            y: self.y.bitxor(rhs),
3✔
1839
            z: self.z.bitxor(rhs),
3✔
1840
        }
1841
    }
1842
}
1843

1844
impl BitXor<&u64> for U64Vec3 {
1845
    type Output = Self;
1846
    #[inline]
1847
    fn bitxor(self, rhs: &u64) -> Self {
3✔
1848
        self.bitxor(*rhs)
3✔
1849
    }
1850
}
1851

1852
impl BitXor<&u64> for &U64Vec3 {
1853
    type Output = U64Vec3;
1854
    #[inline]
1855
    fn bitxor(self, rhs: &u64) -> U64Vec3 {
3✔
1856
        (*self).bitxor(*rhs)
3✔
1857
    }
1858
}
1859

1860
impl BitXor<u64> for &U64Vec3 {
1861
    type Output = U64Vec3;
1862
    #[inline]
1863
    fn bitxor(self, rhs: u64) -> U64Vec3 {
3✔
1864
        (*self).bitxor(rhs)
3✔
1865
    }
1866
}
1867

1868
impl BitXorAssign<u64> for U64Vec3 {
1869
    #[inline]
1870
    fn bitxor_assign(&mut self, rhs: u64) {
3✔
1871
        *self = self.bitxor(rhs);
3✔
1872
    }
1873
}
1874

1875
impl BitXorAssign<&u64> for U64Vec3 {
1876
    #[inline]
1877
    fn bitxor_assign(&mut self, rhs: &u64) {
3✔
1878
        self.bitxor_assign(*rhs);
3✔
1879
    }
1880
}
1881

1882
impl Shl<i8> for U64Vec3 {
1883
    type Output = Self;
1884
    #[inline]
1885
    fn shl(self, rhs: i8) -> Self::Output {
3✔
1886
        Self {
1887
            x: self.x.shl(rhs),
3✔
1888
            y: self.y.shl(rhs),
3✔
1889
            z: self.z.shl(rhs),
3✔
1890
        }
1891
    }
1892
}
1893

1894
impl Shl<&i8> for U64Vec3 {
1895
    type Output = Self;
1896
    #[inline]
1897
    fn shl(self, rhs: &i8) -> Self {
3✔
1898
        self.shl(*rhs)
3✔
1899
    }
1900
}
1901

1902
impl Shl<&i8> for &U64Vec3 {
1903
    type Output = U64Vec3;
1904
    #[inline]
1905
    fn shl(self, rhs: &i8) -> U64Vec3 {
3✔
1906
        (*self).shl(*rhs)
3✔
1907
    }
1908
}
1909

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

1918
impl ShlAssign<i8> for U64Vec3 {
1919
    #[inline]
1920
    fn shl_assign(&mut self, rhs: i8) {
3✔
1921
        *self = self.shl(rhs);
3✔
1922
    }
1923
}
1924

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

1932
impl Shr<i8> for U64Vec3 {
1933
    type Output = Self;
1934
    #[inline]
1935
    fn shr(self, rhs: i8) -> Self::Output {
3✔
1936
        Self {
1937
            x: self.x.shr(rhs),
3✔
1938
            y: self.y.shr(rhs),
3✔
1939
            z: self.z.shr(rhs),
3✔
1940
        }
1941
    }
1942
}
1943

1944
impl Shr<&i8> for U64Vec3 {
1945
    type Output = Self;
1946
    #[inline]
1947
    fn shr(self, rhs: &i8) -> Self {
3✔
1948
        self.shr(*rhs)
3✔
1949
    }
1950
}
1951

1952
impl Shr<&i8> for &U64Vec3 {
1953
    type Output = U64Vec3;
1954
    #[inline]
1955
    fn shr(self, rhs: &i8) -> U64Vec3 {
3✔
1956
        (*self).shr(*rhs)
3✔
1957
    }
1958
}
1959

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

1968
impl ShrAssign<i8> for U64Vec3 {
1969
    #[inline]
1970
    fn shr_assign(&mut self, rhs: i8) {
3✔
1971
        *self = self.shr(rhs);
3✔
1972
    }
1973
}
1974

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

1982
impl Shl<i16> for U64Vec3 {
1983
    type Output = Self;
1984
    #[inline]
1985
    fn shl(self, rhs: i16) -> Self::Output {
3✔
1986
        Self {
1987
            x: self.x.shl(rhs),
3✔
1988
            y: self.y.shl(rhs),
3✔
1989
            z: self.z.shl(rhs),
3✔
1990
        }
1991
    }
1992
}
1993

1994
impl Shl<&i16> for U64Vec3 {
1995
    type Output = Self;
1996
    #[inline]
1997
    fn shl(self, rhs: &i16) -> Self {
3✔
1998
        self.shl(*rhs)
3✔
1999
    }
2000
}
2001

2002
impl Shl<&i16> for &U64Vec3 {
2003
    type Output = U64Vec3;
2004
    #[inline]
2005
    fn shl(self, rhs: &i16) -> U64Vec3 {
3✔
2006
        (*self).shl(*rhs)
3✔
2007
    }
2008
}
2009

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

2018
impl ShlAssign<i16> for U64Vec3 {
2019
    #[inline]
2020
    fn shl_assign(&mut self, rhs: i16) {
3✔
2021
        *self = self.shl(rhs);
3✔
2022
    }
2023
}
2024

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

2032
impl Shr<i16> for U64Vec3 {
2033
    type Output = Self;
2034
    #[inline]
2035
    fn shr(self, rhs: i16) -> Self::Output {
3✔
2036
        Self {
2037
            x: self.x.shr(rhs),
3✔
2038
            y: self.y.shr(rhs),
3✔
2039
            z: self.z.shr(rhs),
3✔
2040
        }
2041
    }
2042
}
2043

2044
impl Shr<&i16> for U64Vec3 {
2045
    type Output = Self;
2046
    #[inline]
2047
    fn shr(self, rhs: &i16) -> Self {
3✔
2048
        self.shr(*rhs)
3✔
2049
    }
2050
}
2051

2052
impl Shr<&i16> for &U64Vec3 {
2053
    type Output = U64Vec3;
2054
    #[inline]
2055
    fn shr(self, rhs: &i16) -> U64Vec3 {
3✔
2056
        (*self).shr(*rhs)
3✔
2057
    }
2058
}
2059

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

2068
impl ShrAssign<i16> for U64Vec3 {
2069
    #[inline]
2070
    fn shr_assign(&mut self, rhs: i16) {
3✔
2071
        *self = self.shr(rhs);
3✔
2072
    }
2073
}
2074

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

2082
impl Shl<i32> for U64Vec3 {
2083
    type Output = Self;
2084
    #[inline]
2085
    fn shl(self, rhs: i32) -> Self::Output {
3✔
2086
        Self {
2087
            x: self.x.shl(rhs),
3✔
2088
            y: self.y.shl(rhs),
3✔
2089
            z: self.z.shl(rhs),
3✔
2090
        }
2091
    }
2092
}
2093

2094
impl Shl<&i32> for U64Vec3 {
2095
    type Output = Self;
2096
    #[inline]
2097
    fn shl(self, rhs: &i32) -> Self {
3✔
2098
        self.shl(*rhs)
3✔
2099
    }
2100
}
2101

2102
impl Shl<&i32> for &U64Vec3 {
2103
    type Output = U64Vec3;
2104
    #[inline]
2105
    fn shl(self, rhs: &i32) -> U64Vec3 {
3✔
2106
        (*self).shl(*rhs)
3✔
2107
    }
2108
}
2109

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

2118
impl ShlAssign<i32> for U64Vec3 {
2119
    #[inline]
2120
    fn shl_assign(&mut self, rhs: i32) {
3✔
2121
        *self = self.shl(rhs);
3✔
2122
    }
2123
}
2124

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

2132
impl Shr<i32> for U64Vec3 {
2133
    type Output = Self;
2134
    #[inline]
2135
    fn shr(self, rhs: i32) -> Self::Output {
3✔
2136
        Self {
2137
            x: self.x.shr(rhs),
3✔
2138
            y: self.y.shr(rhs),
3✔
2139
            z: self.z.shr(rhs),
3✔
2140
        }
2141
    }
2142
}
2143

2144
impl Shr<&i32> for U64Vec3 {
2145
    type Output = Self;
2146
    #[inline]
2147
    fn shr(self, rhs: &i32) -> Self {
3✔
2148
        self.shr(*rhs)
3✔
2149
    }
2150
}
2151

2152
impl Shr<&i32> for &U64Vec3 {
2153
    type Output = U64Vec3;
2154
    #[inline]
2155
    fn shr(self, rhs: &i32) -> U64Vec3 {
3✔
2156
        (*self).shr(*rhs)
3✔
2157
    }
2158
}
2159

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

2168
impl ShrAssign<i32> for U64Vec3 {
2169
    #[inline]
2170
    fn shr_assign(&mut self, rhs: i32) {
3✔
2171
        *self = self.shr(rhs);
3✔
2172
    }
2173
}
2174

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

2182
impl Shl<i64> for U64Vec3 {
2183
    type Output = Self;
2184
    #[inline]
2185
    fn shl(self, rhs: i64) -> Self::Output {
3✔
2186
        Self {
2187
            x: self.x.shl(rhs),
3✔
2188
            y: self.y.shl(rhs),
3✔
2189
            z: self.z.shl(rhs),
3✔
2190
        }
2191
    }
2192
}
2193

2194
impl Shl<&i64> for U64Vec3 {
2195
    type Output = Self;
2196
    #[inline]
2197
    fn shl(self, rhs: &i64) -> Self {
3✔
2198
        self.shl(*rhs)
3✔
2199
    }
2200
}
2201

2202
impl Shl<&i64> for &U64Vec3 {
2203
    type Output = U64Vec3;
2204
    #[inline]
2205
    fn shl(self, rhs: &i64) -> U64Vec3 {
3✔
2206
        (*self).shl(*rhs)
3✔
2207
    }
2208
}
2209

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

2218
impl ShlAssign<i64> for U64Vec3 {
2219
    #[inline]
2220
    fn shl_assign(&mut self, rhs: i64) {
3✔
2221
        *self = self.shl(rhs);
3✔
2222
    }
2223
}
2224

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

2232
impl Shr<i64> for U64Vec3 {
2233
    type Output = Self;
2234
    #[inline]
2235
    fn shr(self, rhs: i64) -> Self::Output {
3✔
2236
        Self {
2237
            x: self.x.shr(rhs),
3✔
2238
            y: self.y.shr(rhs),
3✔
2239
            z: self.z.shr(rhs),
3✔
2240
        }
2241
    }
2242
}
2243

2244
impl Shr<&i64> for U64Vec3 {
2245
    type Output = Self;
2246
    #[inline]
2247
    fn shr(self, rhs: &i64) -> Self {
3✔
2248
        self.shr(*rhs)
3✔
2249
    }
2250
}
2251

2252
impl Shr<&i64> for &U64Vec3 {
2253
    type Output = U64Vec3;
2254
    #[inline]
2255
    fn shr(self, rhs: &i64) -> U64Vec3 {
3✔
2256
        (*self).shr(*rhs)
3✔
2257
    }
2258
}
2259

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

2268
impl ShrAssign<i64> for U64Vec3 {
2269
    #[inline]
2270
    fn shr_assign(&mut self, rhs: i64) {
3✔
2271
        *self = self.shr(rhs);
3✔
2272
    }
2273
}
2274

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

2282
impl Shl<u8> for U64Vec3 {
2283
    type Output = Self;
2284
    #[inline]
2285
    fn shl(self, rhs: u8) -> Self::Output {
3✔
2286
        Self {
2287
            x: self.x.shl(rhs),
3✔
2288
            y: self.y.shl(rhs),
3✔
2289
            z: self.z.shl(rhs),
3✔
2290
        }
2291
    }
2292
}
2293

2294
impl Shl<&u8> for U64Vec3 {
2295
    type Output = Self;
2296
    #[inline]
2297
    fn shl(self, rhs: &u8) -> Self {
3✔
2298
        self.shl(*rhs)
3✔
2299
    }
2300
}
2301

2302
impl Shl<&u8> for &U64Vec3 {
2303
    type Output = U64Vec3;
2304
    #[inline]
2305
    fn shl(self, rhs: &u8) -> U64Vec3 {
3✔
2306
        (*self).shl(*rhs)
3✔
2307
    }
2308
}
2309

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

2318
impl ShlAssign<u8> for U64Vec3 {
2319
    #[inline]
2320
    fn shl_assign(&mut self, rhs: u8) {
3✔
2321
        *self = self.shl(rhs);
3✔
2322
    }
2323
}
2324

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

2332
impl Shr<u8> for U64Vec3 {
2333
    type Output = Self;
2334
    #[inline]
2335
    fn shr(self, rhs: u8) -> Self::Output {
3✔
2336
        Self {
2337
            x: self.x.shr(rhs),
3✔
2338
            y: self.y.shr(rhs),
3✔
2339
            z: self.z.shr(rhs),
3✔
2340
        }
2341
    }
2342
}
2343

2344
impl Shr<&u8> for U64Vec3 {
2345
    type Output = Self;
2346
    #[inline]
2347
    fn shr(self, rhs: &u8) -> Self {
3✔
2348
        self.shr(*rhs)
3✔
2349
    }
2350
}
2351

2352
impl Shr<&u8> for &U64Vec3 {
2353
    type Output = U64Vec3;
2354
    #[inline]
2355
    fn shr(self, rhs: &u8) -> U64Vec3 {
3✔
2356
        (*self).shr(*rhs)
3✔
2357
    }
2358
}
2359

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

2368
impl ShrAssign<u8> for U64Vec3 {
2369
    #[inline]
2370
    fn shr_assign(&mut self, rhs: u8) {
3✔
2371
        *self = self.shr(rhs);
3✔
2372
    }
2373
}
2374

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

2382
impl Shl<u16> for U64Vec3 {
2383
    type Output = Self;
2384
    #[inline]
2385
    fn shl(self, rhs: u16) -> Self::Output {
3✔
2386
        Self {
2387
            x: self.x.shl(rhs),
3✔
2388
            y: self.y.shl(rhs),
3✔
2389
            z: self.z.shl(rhs),
3✔
2390
        }
2391
    }
2392
}
2393

2394
impl Shl<&u16> for U64Vec3 {
2395
    type Output = Self;
2396
    #[inline]
2397
    fn shl(self, rhs: &u16) -> Self {
3✔
2398
        self.shl(*rhs)
3✔
2399
    }
2400
}
2401

2402
impl Shl<&u16> for &U64Vec3 {
2403
    type Output = U64Vec3;
2404
    #[inline]
2405
    fn shl(self, rhs: &u16) -> U64Vec3 {
3✔
2406
        (*self).shl(*rhs)
3✔
2407
    }
2408
}
2409

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

2418
impl ShlAssign<u16> for U64Vec3 {
2419
    #[inline]
2420
    fn shl_assign(&mut self, rhs: u16) {
3✔
2421
        *self = self.shl(rhs);
3✔
2422
    }
2423
}
2424

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

2432
impl Shr<u16> for U64Vec3 {
2433
    type Output = Self;
2434
    #[inline]
2435
    fn shr(self, rhs: u16) -> Self::Output {
3✔
2436
        Self {
2437
            x: self.x.shr(rhs),
3✔
2438
            y: self.y.shr(rhs),
3✔
2439
            z: self.z.shr(rhs),
3✔
2440
        }
2441
    }
2442
}
2443

2444
impl Shr<&u16> for U64Vec3 {
2445
    type Output = Self;
2446
    #[inline]
2447
    fn shr(self, rhs: &u16) -> Self {
3✔
2448
        self.shr(*rhs)
3✔
2449
    }
2450
}
2451

2452
impl Shr<&u16> for &U64Vec3 {
2453
    type Output = U64Vec3;
2454
    #[inline]
2455
    fn shr(self, rhs: &u16) -> U64Vec3 {
3✔
2456
        (*self).shr(*rhs)
3✔
2457
    }
2458
}
2459

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

2468
impl ShrAssign<u16> for U64Vec3 {
2469
    #[inline]
2470
    fn shr_assign(&mut self, rhs: u16) {
3✔
2471
        *self = self.shr(rhs);
3✔
2472
    }
2473
}
2474

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

2482
impl Shl<u32> for U64Vec3 {
2483
    type Output = Self;
2484
    #[inline]
2485
    fn shl(self, rhs: u32) -> Self::Output {
3✔
2486
        Self {
2487
            x: self.x.shl(rhs),
3✔
2488
            y: self.y.shl(rhs),
3✔
2489
            z: self.z.shl(rhs),
3✔
2490
        }
2491
    }
2492
}
2493

2494
impl Shl<&u32> for U64Vec3 {
2495
    type Output = Self;
2496
    #[inline]
2497
    fn shl(self, rhs: &u32) -> Self {
3✔
2498
        self.shl(*rhs)
3✔
2499
    }
2500
}
2501

2502
impl Shl<&u32> for &U64Vec3 {
2503
    type Output = U64Vec3;
2504
    #[inline]
2505
    fn shl(self, rhs: &u32) -> U64Vec3 {
3✔
2506
        (*self).shl(*rhs)
3✔
2507
    }
2508
}
2509

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

2518
impl ShlAssign<u32> for U64Vec3 {
2519
    #[inline]
2520
    fn shl_assign(&mut self, rhs: u32) {
3✔
2521
        *self = self.shl(rhs);
3✔
2522
    }
2523
}
2524

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

2532
impl Shr<u32> for U64Vec3 {
2533
    type Output = Self;
2534
    #[inline]
2535
    fn shr(self, rhs: u32) -> Self::Output {
3✔
2536
        Self {
2537
            x: self.x.shr(rhs),
3✔
2538
            y: self.y.shr(rhs),
3✔
2539
            z: self.z.shr(rhs),
3✔
2540
        }
2541
    }
2542
}
2543

2544
impl Shr<&u32> for U64Vec3 {
2545
    type Output = Self;
2546
    #[inline]
2547
    fn shr(self, rhs: &u32) -> Self {
3✔
2548
        self.shr(*rhs)
3✔
2549
    }
2550
}
2551

2552
impl Shr<&u32> for &U64Vec3 {
2553
    type Output = U64Vec3;
2554
    #[inline]
2555
    fn shr(self, rhs: &u32) -> U64Vec3 {
3✔
2556
        (*self).shr(*rhs)
3✔
2557
    }
2558
}
2559

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

2568
impl ShrAssign<u32> for U64Vec3 {
2569
    #[inline]
2570
    fn shr_assign(&mut self, rhs: u32) {
3✔
2571
        *self = self.shr(rhs);
3✔
2572
    }
2573
}
2574

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

2582
impl Shl<u64> for U64Vec3 {
2583
    type Output = Self;
2584
    #[inline]
2585
    fn shl(self, rhs: u64) -> Self::Output {
3✔
2586
        Self {
2587
            x: self.x.shl(rhs),
3✔
2588
            y: self.y.shl(rhs),
3✔
2589
            z: self.z.shl(rhs),
3✔
2590
        }
2591
    }
2592
}
2593

2594
impl Shl<&u64> for U64Vec3 {
2595
    type Output = Self;
2596
    #[inline]
2597
    fn shl(self, rhs: &u64) -> Self {
3✔
2598
        self.shl(*rhs)
3✔
2599
    }
2600
}
2601

2602
impl Shl<&u64> for &U64Vec3 {
2603
    type Output = U64Vec3;
2604
    #[inline]
2605
    fn shl(self, rhs: &u64) -> U64Vec3 {
3✔
2606
        (*self).shl(*rhs)
3✔
2607
    }
2608
}
2609

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

2618
impl ShlAssign<u64> for U64Vec3 {
2619
    #[inline]
2620
    fn shl_assign(&mut self, rhs: u64) {
3✔
2621
        *self = self.shl(rhs);
3✔
2622
    }
2623
}
2624

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

2632
impl Shr<u64> for U64Vec3 {
2633
    type Output = Self;
2634
    #[inline]
2635
    fn shr(self, rhs: u64) -> Self::Output {
3✔
2636
        Self {
2637
            x: self.x.shr(rhs),
3✔
2638
            y: self.y.shr(rhs),
3✔
2639
            z: self.z.shr(rhs),
3✔
2640
        }
2641
    }
2642
}
2643

2644
impl Shr<&u64> for U64Vec3 {
2645
    type Output = Self;
2646
    #[inline]
2647
    fn shr(self, rhs: &u64) -> Self {
3✔
2648
        self.shr(*rhs)
3✔
2649
    }
2650
}
2651

2652
impl Shr<&u64> for &U64Vec3 {
2653
    type Output = U64Vec3;
2654
    #[inline]
2655
    fn shr(self, rhs: &u64) -> U64Vec3 {
3✔
2656
        (*self).shr(*rhs)
3✔
2657
    }
2658
}
2659

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

2668
impl ShrAssign<u64> for U64Vec3 {
2669
    #[inline]
2670
    fn shr_assign(&mut self, rhs: u64) {
3✔
2671
        *self = self.shr(rhs);
3✔
2672
    }
2673
}
2674

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

2682
#[cfg(feature = "i32")]
2683

2684
impl Shl<IVec3> for U64Vec3 {
2685
    type Output = Self;
2686
    #[inline]
2687
    fn shl(self, rhs: IVec3) -> Self {
3✔
2688
        Self {
2689
            x: self.x.shl(rhs.x),
3✔
2690
            y: self.y.shl(rhs.y),
3✔
2691
            z: self.z.shl(rhs.z),
3✔
2692
        }
2693
    }
2694
}
2695

2696
#[cfg(feature = "i32")]
2697

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

2706
#[cfg(feature = "i32")]
2707

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

2716
#[cfg(feature = "i32")]
2717

2718
impl Shl<IVec3> for &U64Vec3 {
2719
    type Output = U64Vec3;
2720
    #[inline]
2721
    fn shl(self, rhs: IVec3) -> U64Vec3 {
3✔
2722
        (*self).shl(rhs)
3✔
2723
    }
2724
}
2725

2726
#[cfg(feature = "i32")]
2727

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

2740
#[cfg(feature = "i32")]
2741

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

2750
#[cfg(feature = "i32")]
2751

2752
impl Shr<&IVec3> for &U64Vec3 {
2753
    type Output = U64Vec3;
2754
    #[inline]
2755
    fn shr(self, rhs: &IVec3) -> U64Vec3 {
3✔
2756
        (*self).shr(*rhs)
3✔
2757
    }
2758
}
2759

2760
#[cfg(feature = "i32")]
2761

2762
impl Shr<IVec3> for &U64Vec3 {
2763
    type Output = U64Vec3;
2764
    #[inline]
2765
    fn shr(self, rhs: IVec3) -> U64Vec3 {
3✔
2766
        (*self).shr(rhs)
3✔
2767
    }
2768
}
2769

2770
#[cfg(feature = "u32")]
2771

2772
impl Shl<UVec3> for U64Vec3 {
2773
    type Output = Self;
2774
    #[inline]
2775
    fn shl(self, rhs: UVec3) -> Self {
3✔
2776
        Self {
2777
            x: self.x.shl(rhs.x),
3✔
2778
            y: self.y.shl(rhs.y),
3✔
2779
            z: self.z.shl(rhs.z),
3✔
2780
        }
2781
    }
2782
}
2783

2784
#[cfg(feature = "u32")]
2785

2786
impl Shl<&UVec3> for U64Vec3 {
2787
    type Output = Self;
2788
    #[inline]
2789
    fn shl(self, rhs: &UVec3) -> Self {
3✔
2790
        self.shl(*rhs)
3✔
2791
    }
2792
}
2793

2794
#[cfg(feature = "u32")]
2795

2796
impl Shl<&UVec3> for &U64Vec3 {
2797
    type Output = U64Vec3;
2798
    #[inline]
2799
    fn shl(self, rhs: &UVec3) -> U64Vec3 {
3✔
2800
        (*self).shl(*rhs)
3✔
2801
    }
2802
}
2803

2804
#[cfg(feature = "u32")]
2805

2806
impl Shl<UVec3> for &U64Vec3 {
2807
    type Output = U64Vec3;
2808
    #[inline]
2809
    fn shl(self, rhs: UVec3) -> U64Vec3 {
3✔
2810
        (*self).shl(rhs)
3✔
2811
    }
2812
}
2813

2814
#[cfg(feature = "u32")]
2815

2816
impl Shr<UVec3> for U64Vec3 {
2817
    type Output = Self;
2818
    #[inline]
2819
    fn shr(self, rhs: UVec3) -> Self {
3✔
2820
        Self {
2821
            x: self.x.shr(rhs.x),
3✔
2822
            y: self.y.shr(rhs.y),
3✔
2823
            z: self.z.shr(rhs.z),
3✔
2824
        }
2825
    }
2826
}
2827

2828
#[cfg(feature = "u32")]
2829

2830
impl Shr<&UVec3> for U64Vec3 {
2831
    type Output = Self;
2832
    #[inline]
2833
    fn shr(self, rhs: &UVec3) -> Self {
3✔
2834
        self.shr(*rhs)
3✔
2835
    }
2836
}
2837

2838
#[cfg(feature = "u32")]
2839

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

2848
#[cfg(feature = "u32")]
2849

2850
impl Shr<UVec3> for &U64Vec3 {
2851
    type Output = U64Vec3;
2852
    #[inline]
2853
    fn shr(self, rhs: UVec3) -> U64Vec3 {
3✔
2854
        (*self).shr(rhs)
3✔
2855
    }
2856
}
2857

2858
impl Index<usize> for U64Vec3 {
2859
    type Output = u64;
2860
    #[inline]
2861
    fn index(&self, index: usize) -> &Self::Output {
3✔
2862
        match index {
6✔
2863
            0 => &self.x,
3✔
2864
            1 => &self.y,
3✔
2865
            2 => &self.z,
3✔
2866
            _ => panic!("index out of bounds"),
×
2867
        }
2868
    }
2869
}
2870

2871
impl IndexMut<usize> for U64Vec3 {
2872
    #[inline]
2873
    fn index_mut(&mut self, index: usize) -> &mut Self::Output {
3✔
2874
        match index {
6✔
2875
            0 => &mut self.x,
3✔
2876
            1 => &mut self.y,
3✔
2877
            2 => &mut self.z,
3✔
2878
            _ => panic!("index out of bounds"),
×
2879
        }
2880
    }
2881
}
2882

2883
impl fmt::Display for U64Vec3 {
2884
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3✔
2885
        write!(f, "[{}, {}, {}]", self.x, self.y, self.z)
3✔
2886
    }
2887
}
2888

2889
impl fmt::Debug for U64Vec3 {
2890
    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
3✔
2891
        fmt.debug_tuple(stringify!(U64Vec3))
3✔
2892
            .field(&self.x)
3✔
2893
            .field(&self.y)
3✔
2894
            .field(&self.z)
3✔
2895
            .finish()
2896
    }
2897
}
2898

2899
impl From<[u64; 3]> for U64Vec3 {
2900
    #[inline]
2901
    fn from(a: [u64; 3]) -> Self {
6✔
2902
        Self::new(a[0], a[1], a[2])
6✔
2903
    }
2904
}
2905

2906
impl From<U64Vec3> for [u64; 3] {
2907
    #[inline]
2908
    fn from(v: U64Vec3) -> Self {
3✔
2909
        [v.x, v.y, v.z]
3✔
2910
    }
2911
}
2912

2913
impl From<(u64, u64, u64)> for U64Vec3 {
2914
    #[inline]
2915
    fn from(t: (u64, u64, u64)) -> Self {
3✔
2916
        Self::new(t.0, t.1, t.2)
3✔
2917
    }
2918
}
2919

2920
impl From<U64Vec3> for (u64, u64, u64) {
2921
    #[inline]
2922
    fn from(v: U64Vec3) -> Self {
6✔
2923
        (v.x, v.y, v.z)
6✔
2924
    }
2925
}
2926

2927
impl From<(U64Vec2, u64)> for U64Vec3 {
2928
    #[inline]
2929
    fn from((v, z): (U64Vec2, u64)) -> Self {
×
2930
        Self::new(v.x, v.y, z)
×
2931
    }
2932
}
2933

2934
impl From<U8Vec3> for U64Vec3 {
2935
    #[inline]
2936
    fn from(v: U8Vec3) -> Self {
3✔
2937
        Self::new(u64::from(v.x), u64::from(v.y), u64::from(v.z))
3✔
2938
    }
2939
}
2940

2941
impl From<U16Vec3> for U64Vec3 {
2942
    #[inline]
2943
    fn from(v: U16Vec3) -> Self {
3✔
2944
        Self::new(u64::from(v.x), u64::from(v.y), u64::from(v.z))
3✔
2945
    }
2946
}
2947

2948
impl From<UVec3> for U64Vec3 {
2949
    #[inline]
2950
    fn from(v: UVec3) -> Self {
3✔
2951
        Self::new(u64::from(v.x), u64::from(v.y), u64::from(v.z))
3✔
2952
    }
2953
}
2954

2955
#[cfg(feature = "i8")]
2956

2957
impl TryFrom<I8Vec3> for U64Vec3 {
2958
    type Error = core::num::TryFromIntError;
2959

2960
    #[inline]
2961
    fn try_from(v: I8Vec3) -> Result<Self, Self::Error> {
3✔
2962
        Ok(Self::new(
3✔
2963
            u64::try_from(v.x)?,
3✔
2964
            u64::try_from(v.y)?,
3✔
2965
            u64::try_from(v.z)?,
3✔
2966
        ))
2967
    }
2968
}
2969

2970
#[cfg(feature = "i16")]
2971

2972
impl TryFrom<I16Vec3> for U64Vec3 {
2973
    type Error = core::num::TryFromIntError;
2974

2975
    #[inline]
2976
    fn try_from(v: I16Vec3) -> Result<Self, Self::Error> {
3✔
2977
        Ok(Self::new(
3✔
2978
            u64::try_from(v.x)?,
3✔
2979
            u64::try_from(v.y)?,
3✔
2980
            u64::try_from(v.z)?,
3✔
2981
        ))
2982
    }
2983
}
2984

2985
#[cfg(feature = "i32")]
2986

2987
impl TryFrom<IVec3> for U64Vec3 {
2988
    type Error = core::num::TryFromIntError;
2989

2990
    #[inline]
2991
    fn try_from(v: IVec3) -> Result<Self, Self::Error> {
3✔
2992
        Ok(Self::new(
3✔
2993
            u64::try_from(v.x)?,
3✔
2994
            u64::try_from(v.y)?,
3✔
2995
            u64::try_from(v.z)?,
3✔
2996
        ))
2997
    }
2998
}
2999

3000
#[cfg(feature = "i64")]
3001

3002
impl TryFrom<I64Vec3> for U64Vec3 {
3003
    type Error = core::num::TryFromIntError;
3004

3005
    #[inline]
3006
    fn try_from(v: I64Vec3) -> Result<Self, Self::Error> {
3✔
3007
        Ok(Self::new(
3✔
3008
            u64::try_from(v.x)?,
3✔
3009
            u64::try_from(v.y)?,
3✔
3010
            u64::try_from(v.z)?,
3✔
3011
        ))
3012
    }
3013
}
3014

3015
#[cfg(feature = "isize")]
3016

3017
impl TryFrom<ISizeVec3> for U64Vec3 {
3018
    type Error = core::num::TryFromIntError;
3019

3020
    #[inline]
3021
    fn try_from(v: ISizeVec3) -> Result<Self, Self::Error> {
3✔
3022
        Ok(Self::new(
3✔
3023
            u64::try_from(v.x)?,
3✔
3024
            u64::try_from(v.y)?,
3✔
3025
            u64::try_from(v.z)?,
3✔
3026
        ))
3027
    }
3028
}
3029

3030
#[cfg(feature = "usize")]
3031

3032
impl TryFrom<USizeVec3> for U64Vec3 {
3033
    type Error = core::num::TryFromIntError;
3034

3035
    #[inline]
3036
    fn try_from(v: USizeVec3) -> Result<Self, Self::Error> {
3✔
3037
        Ok(Self::new(
3✔
3038
            u64::try_from(v.x)?,
3✔
3039
            u64::try_from(v.y)?,
3✔
3040
            u64::try_from(v.z)?,
3✔
3041
        ))
3042
    }
3043
}
3044

3045
impl From<BVec3> for U64Vec3 {
3046
    #[inline]
3047
    fn from(v: BVec3) -> Self {
3✔
3048
        Self::new(u64::from(v.x), u64::from(v.y), u64::from(v.z))
3✔
3049
    }
3050
}
3051

3052
impl From<BVec3A> for U64Vec3 {
3053
    #[inline]
3054
    fn from(v: BVec3A) -> Self {
3✔
3055
        let bool_array: [bool; 3] = v.into();
3✔
3056
        Self::new(
3057
            u64::from(bool_array[0]),
3✔
3058
            u64::from(bool_array[1]),
3✔
3059
            u64::from(bool_array[2]),
3✔
3060
        )
3061
    }
3062
}
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