• 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.57
/src/u64/u64vec2.rs
1
// Generated from vec.rs.tera template. Edit the template, not the generated file.
2

3
use crate::{BVec2, U16Vec2, U64Vec3, U8Vec2, UVec2};
4

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

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

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

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

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

20
#[cfg(feature = "usize")]
21
use crate::USizeVec2;
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 2-dimensional vector.
31
#[inline(always)]
32
#[must_use]
33
pub const fn u64vec2(x: u64, y: u64) -> U64Vec2 {
6✔
34
    U64Vec2::new(x, y)
×
35
}
36

37
/// A 2-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
#[cfg_attr(feature = "cuda", repr(align(16)))]
45
#[repr(C)]
46
#[cfg_attr(target_arch = "spirv", rust_gpu::vector::v1)]
47
pub struct U64Vec2 {
48
    pub x: u64,
49
    pub y: u64,
50
}
51

52
impl U64Vec2 {
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);
67

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

71
    /// The unit axes.
72
    pub const AXES: [Self; 2] = [Self::X, Self::Y];
73

74
    /// Creates a new vector.
75
    #[inline(always)]
76
    #[must_use]
77
    pub const fn new(x: u64, y: u64) -> Self {
9✔
78
        Self { x, y }
79
    }
80

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

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

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

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

119
    /// Converts `self` to `[x, y]`
120
    #[inline]
121
    #[must_use]
122
    pub const fn to_array(&self) -> [u64; 2] {
3✔
123
        [self.x, self.y]
3✔
124
    }
125

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

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

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

155
    /// Creates a 2D vector from `self` with the given value of `x`.
156
    #[inline]
157
    #[must_use]
158
    pub fn with_x(mut self, x: u64) -> Self {
3✔
159
        self.x = x;
3✔
160
        self
3✔
161
    }
162

163
    /// Creates a 2D vector from `self` with the given value of `y`.
164
    #[inline]
165
    #[must_use]
166
    pub fn with_y(mut self, y: u64) -> Self {
3✔
167
        self.y = y;
3✔
168
        self
3✔
169
    }
170

171
    /// Computes the dot product of `self` and `rhs`.
172
    #[inline]
173
    #[must_use]
174
    pub fn dot(self, rhs: Self) -> u64 {
3✔
175
        (self.x * rhs.x) + (self.y * rhs.y)
3✔
176
    }
177

178
    /// Returns a vector where every component is the dot product of `self` and `rhs`.
179
    #[inline]
180
    #[must_use]
181
    pub fn dot_into_vec(self, rhs: Self) -> Self {
3✔
182
        Self::splat(self.dot(rhs))
3✔
183
    }
184

185
    /// Returns a vector containing the minimum values for each element of `self` and `rhs`.
186
    ///
187
    /// In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.
188
    #[inline]
189
    #[must_use]
190
    pub fn min(self, rhs: Self) -> Self {
3✔
191
        Self {
192
            x: if self.x < rhs.x { self.x } else { rhs.x },
3✔
193
            y: if self.y < rhs.y { self.y } else { rhs.y },
3✔
194
        }
195
    }
196

197
    /// Returns a vector containing the maximum values for each element of `self` and `rhs`.
198
    ///
199
    /// In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.
200
    #[inline]
201
    #[must_use]
202
    pub fn max(self, rhs: Self) -> Self {
3✔
203
        Self {
204
            x: if self.x > rhs.x { self.x } else { rhs.x },
3✔
205
            y: if self.y > rhs.y { self.y } else { rhs.y },
3✔
206
        }
207
    }
208

209
    /// Component-wise clamping of values, similar to [`u64::clamp`].
210
    ///
211
    /// Each element in `min` must be less-or-equal to the corresponding element in `max`.
212
    ///
213
    /// # Panics
214
    ///
215
    /// Will panic if `min` is greater than `max` when `glam_assert` is enabled.
216
    #[inline]
217
    #[must_use]
218
    pub fn clamp(self, min: Self, max: Self) -> Self {
3✔
219
        glam_assert!(min.cmple(max).all(), "clamp: expected min <= max");
3✔
220
        self.max(min).min(max)
3✔
221
    }
222

223
    /// Returns the horizontal minimum of `self`.
224
    ///
225
    /// In other words this computes `min(x, y, ..)`.
226
    #[inline]
227
    #[must_use]
228
    pub fn min_element(self) -> u64 {
3✔
229
        let min = |a, b| if a < b { a } else { b };
6✔
230
        min(self.x, self.y)
3✔
231
    }
232

233
    /// Returns the horizontal maximum of `self`.
234
    ///
235
    /// In other words this computes `max(x, y, ..)`.
236
    #[inline]
237
    #[must_use]
238
    pub fn max_element(self) -> u64 {
3✔
239
        let max = |a, b| if a > b { a } else { b };
6✔
240
        max(self.x, self.y)
3✔
241
    }
242

243
    /// Returns the index of the first minimum element of `self`.
244
    #[doc(alias = "argmin")]
245
    #[inline]
246
    #[must_use]
247
    pub fn min_position(self) -> usize {
3✔
248
        if self.x <= self.y {
6✔
249
            0
3✔
250
        } else {
251
            1
3✔
252
        }
253
    }
254

255
    /// Returns the index of the first maximum element of `self`.
256
    #[doc(alias = "argmax")]
257
    #[inline]
258
    #[must_use]
259
    pub fn max_position(self) -> usize {
3✔
260
        if self.x >= self.y {
6✔
261
            0
3✔
262
        } else {
263
            1
3✔
264
        }
265
    }
266

267
    /// Returns the sum of all elements of `self`.
268
    ///
269
    /// In other words, this computes `self.x + self.y + ..`.
270
    #[inline]
271
    #[must_use]
272
    pub fn element_sum(self) -> u64 {
3✔
273
        self.x + self.y
3✔
274
    }
275

276
    /// Returns the product of all elements of `self`.
277
    ///
278
    /// In other words, this computes `self.x * self.y * ..`.
279
    #[inline]
280
    #[must_use]
281
    pub fn element_product(self) -> u64 {
3✔
282
        self.x * self.y
3✔
283
    }
284

285
    /// Returns a vector mask containing the result of a `==` comparison for each element of
286
    /// `self` and `rhs`.
287
    ///
288
    /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all
289
    /// elements.
290
    #[inline]
291
    #[must_use]
292
    pub fn cmpeq(self, rhs: Self) -> BVec2 {
3✔
293
        BVec2::new(self.x.eq(&rhs.x), self.y.eq(&rhs.y))
3✔
294
    }
295

296
    /// Returns a vector mask containing the result of a `!=` comparison for each element of
297
    /// `self` and `rhs`.
298
    ///
299
    /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all
300
    /// elements.
301
    #[inline]
302
    #[must_use]
303
    pub fn cmpne(self, rhs: Self) -> BVec2 {
3✔
304
        BVec2::new(self.x.ne(&rhs.x), self.y.ne(&rhs.y))
3✔
305
    }
306

307
    /// Returns a vector mask containing the result of a `>=` comparison for each element of
308
    /// `self` and `rhs`.
309
    ///
310
    /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all
311
    /// elements.
312
    #[inline]
313
    #[must_use]
314
    pub fn cmpge(self, rhs: Self) -> BVec2 {
3✔
315
        BVec2::new(self.x.ge(&rhs.x), self.y.ge(&rhs.y))
3✔
316
    }
317

318
    /// Returns a vector mask containing the result of a `>` comparison for each element of
319
    /// `self` and `rhs`.
320
    ///
321
    /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all
322
    /// elements.
323
    #[inline]
324
    #[must_use]
325
    pub fn cmpgt(self, rhs: Self) -> BVec2 {
3✔
326
        BVec2::new(self.x.gt(&rhs.x), self.y.gt(&rhs.y))
3✔
327
    }
328

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

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

351
    /// Computes the squared length of `self`.
352
    #[doc(alias = "magnitude2")]
353
    #[inline]
354
    #[must_use]
355
    pub fn length_squared(self) -> u64 {
3✔
356
        self.dot(self)
3✔
357
    }
358

359
    /// Computes the [manhattan distance] between two points.
360
    ///
361
    /// # Overflow
362
    /// This method may overflow if the result is greater than [`u64::MAX`].
363
    ///
364
    /// See also [`checked_manhattan_distance`][U64Vec2::checked_manhattan_distance].
365
    ///
366
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
367
    #[inline]
368
    #[must_use]
369
    pub fn manhattan_distance(self, rhs: Self) -> u64 {
3✔
370
        self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y)
3✔
371
    }
372

373
    /// Computes the [manhattan distance] between two points.
374
    ///
375
    /// This will returns [`None`] if the result is greater than [`u64::MAX`].
376
    ///
377
    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
378
    #[inline]
379
    #[must_use]
380
    pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
3✔
381
        let d = self.x.abs_diff(rhs.x);
3✔
382
        d.checked_add(self.y.abs_diff(rhs.y))
3✔
383
    }
384

385
    /// Computes the [chebyshev distance] between two points.
386
    ///
387
    /// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
388
    #[inline]
389
    #[must_use]
390
    pub fn chebyshev_distance(self, rhs: Self) -> u64 {
3✔
391
        // Note: the compiler will eventually optimize out the loop
392
        [self.x.abs_diff(rhs.x), self.y.abs_diff(rhs.y)]
3✔
393
            .into_iter()
394
            .max()
395
            .unwrap()
396
    }
397

398
    /// Casts all elements of `self` to `f32`.
399
    #[inline]
400
    #[must_use]
401
    pub fn as_vec2(self) -> crate::Vec2 {
3✔
402
        crate::Vec2::new(self.x as f32, self.y as f32)
9✔
403
    }
404

405
    /// Casts all elements of `self` to `f64`.
406
    #[cfg(feature = "f64")]
407
    #[inline]
408
    #[must_use]
409
    pub fn as_dvec2(self) -> crate::DVec2 {
3✔
410
        crate::DVec2::new(self.x as f64, self.y as f64)
3✔
411
    }
412

413
    /// Casts all elements of `self` to `i8`.
414
    #[cfg(feature = "i8")]
415
    #[inline]
416
    #[must_use]
417
    pub fn as_i8vec2(self) -> crate::I8Vec2 {
3✔
418
        crate::I8Vec2::new(self.x as i8, self.y as i8)
3✔
419
    }
420

421
    /// Casts all elements of `self` to `u8`.
422
    #[cfg(feature = "u8")]
423
    #[inline]
424
    #[must_use]
425
    pub fn as_u8vec2(self) -> crate::U8Vec2 {
3✔
426
        crate::U8Vec2::new(self.x as u8, self.y as u8)
3✔
427
    }
428

429
    /// Casts all elements of `self` to `i16`.
430
    #[cfg(feature = "i16")]
431
    #[inline]
432
    #[must_use]
433
    pub fn as_i16vec2(self) -> crate::I16Vec2 {
3✔
434
        crate::I16Vec2::new(self.x as i16, self.y as i16)
3✔
435
    }
436

437
    /// Casts all elements of `self` to `u16`.
438
    #[cfg(feature = "u16")]
439
    #[inline]
440
    #[must_use]
441
    pub fn as_u16vec2(self) -> crate::U16Vec2 {
3✔
442
        crate::U16Vec2::new(self.x as u16, self.y as u16)
3✔
443
    }
444

445
    /// Casts all elements of `self` to `i32`.
446
    #[cfg(feature = "i32")]
447
    #[inline]
448
    #[must_use]
449
    pub fn as_ivec2(self) -> crate::IVec2 {
3✔
450
        crate::IVec2::new(self.x as i32, self.y as i32)
3✔
451
    }
452

453
    /// Casts all elements of `self` to `u32`.
454
    #[cfg(feature = "u32")]
455
    #[inline]
456
    #[must_use]
457
    pub fn as_uvec2(self) -> crate::UVec2 {
3✔
458
        crate::UVec2::new(self.x as u32, self.y as u32)
3✔
459
    }
460

461
    /// Casts all elements of `self` to `i64`.
462
    #[cfg(feature = "i64")]
463
    #[inline]
464
    #[must_use]
465
    pub fn as_i64vec2(self) -> crate::I64Vec2 {
3✔
466
        crate::I64Vec2::new(self.x as i64, self.y as i64)
3✔
467
    }
468

469
    /// Casts all elements of `self` to `isize`.
470
    #[cfg(feature = "isize")]
471
    #[inline]
472
    #[must_use]
473
    pub fn as_isizevec2(self) -> crate::ISizeVec2 {
3✔
474
        crate::ISizeVec2::new(self.x as isize, self.y as isize)
3✔
475
    }
476

477
    /// Casts all elements of `self` to `usize`.
478
    #[cfg(feature = "usize")]
479
    #[inline]
480
    #[must_use]
481
    pub fn as_usizevec2(self) -> crate::USizeVec2 {
3✔
482
        crate::USizeVec2::new(self.x as usize, self.y as usize)
3✔
483
    }
484

485
    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
486
    ///
487
    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
488
    #[inline]
489
    #[must_use]
490
    pub const fn checked_add(self, rhs: Self) -> Option<Self> {
3✔
491
        let x = match self.x.checked_add(rhs.x) {
3✔
492
            Some(v) => v,
3✔
493
            None => return None,
3✔
494
        };
495
        let y = match self.y.checked_add(rhs.y) {
3✔
496
            Some(v) => v,
3✔
497
            None => return None,
3✔
498
        };
499

500
        Some(Self { x, y })
3✔
501
    }
502

503
    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
504
    ///
505
    /// In other words this computes `Some([self.x - rhs.x, self.y - rhs.y, ..])` but returns `None` on any overflow.
506
    #[inline]
507
    #[must_use]
508
    pub const fn checked_sub(self, rhs: Self) -> Option<Self> {
3✔
509
        let x = match self.x.checked_sub(rhs.x) {
3✔
510
            Some(v) => v,
3✔
511
            None => return None,
3✔
512
        };
513
        let y = match self.y.checked_sub(rhs.y) {
3✔
514
            Some(v) => v,
3✔
515
            None => return None,
3✔
516
        };
517

518
        Some(Self { x, y })
3✔
519
    }
520

521
    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
522
    ///
523
    /// In other words this computes `Some([self.x * rhs.x, self.y * rhs.y, ..])` but returns `None` on any overflow.
524
    #[inline]
525
    #[must_use]
526
    pub const fn checked_mul(self, rhs: Self) -> Option<Self> {
3✔
527
        let x = match self.x.checked_mul(rhs.x) {
3✔
528
            Some(v) => v,
3✔
529
            None => return None,
3✔
530
        };
531
        let y = match self.y.checked_mul(rhs.y) {
3✔
532
            Some(v) => v,
3✔
533
            None => return None,
×
534
        };
535

536
        Some(Self { x, y })
3✔
537
    }
538

539
    /// Returns a vector containing the wrapping division of `self` and `rhs`.
540
    ///
541
    /// In other words this computes `Some([self.x / rhs.x, self.y / rhs.y, ..])` but returns `None` on any division by zero.
542
    #[inline]
543
    #[must_use]
544
    pub const fn checked_div(self, rhs: Self) -> Option<Self> {
3✔
545
        let x = match self.x.checked_div(rhs.x) {
3✔
546
            Some(v) => v,
3✔
547
            None => return None,
3✔
548
        };
549
        let y = match self.y.checked_div(rhs.y) {
3✔
550
            Some(v) => v,
3✔
551
            None => return None,
3✔
552
        };
553

554
        Some(Self { x, y })
3✔
555
    }
556

557
    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
558
    ///
559
    /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.
560
    #[inline]
561
    #[must_use]
562
    pub const fn wrapping_add(self, rhs: Self) -> Self {
3✔
563
        Self {
564
            x: self.x.wrapping_add(rhs.x),
3✔
565
            y: self.y.wrapping_add(rhs.y),
3✔
566
        }
567
    }
568

569
    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
570
    ///
571
    /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.
572
    #[inline]
573
    #[must_use]
574
    pub const fn wrapping_sub(self, rhs: Self) -> Self {
3✔
575
        Self {
576
            x: self.x.wrapping_sub(rhs.x),
3✔
577
            y: self.y.wrapping_sub(rhs.y),
3✔
578
        }
579
    }
580

581
    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
582
    ///
583
    /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.
584
    #[inline]
585
    #[must_use]
586
    pub const fn wrapping_mul(self, rhs: Self) -> Self {
3✔
587
        Self {
588
            x: self.x.wrapping_mul(rhs.x),
3✔
589
            y: self.y.wrapping_mul(rhs.y),
3✔
590
        }
591
    }
592

593
    /// Returns a vector containing the wrapping division of `self` and `rhs`.
594
    ///
595
    /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.
596
    #[inline]
597
    #[must_use]
598
    pub const fn wrapping_div(self, rhs: Self) -> Self {
3✔
599
        Self {
600
            x: self.x.wrapping_div(rhs.x),
3✔
601
            y: self.y.wrapping_div(rhs.y),
3✔
602
        }
603
    }
604

605
    /// Returns a vector containing the saturating addition of `self` and `rhs`.
606
    ///
607
    /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.
608
    #[inline]
609
    #[must_use]
610
    pub const fn saturating_add(self, rhs: Self) -> Self {
3✔
611
        Self {
612
            x: self.x.saturating_add(rhs.x),
3✔
613
            y: self.y.saturating_add(rhs.y),
3✔
614
        }
615
    }
616

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

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

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

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

657
    #[cfg(feature = "i64")]
658
    #[inline]
659
    #[must_use]
660
    pub const fn checked_add_signed(self, rhs: I64Vec2) -> Option<Self> {
×
661
        let x = match self.x.checked_add_signed(rhs.x) {
×
662
            Some(v) => v,
×
663
            None => return None,
×
664
        };
665
        let y = match self.y.checked_add_signed(rhs.y) {
×
666
            Some(v) => v,
×
667
            None => return None,
×
668
        };
669

670
        Some(Self { x, y })
×
671
    }
672

673
    /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.
674
    ///
675
    /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.
676

677
    #[cfg(feature = "i64")]
678
    #[inline]
679
    #[must_use]
680
    pub const fn wrapping_add_signed(self, rhs: I64Vec2) -> Self {
3✔
681
        Self {
682
            x: self.x.wrapping_add_signed(rhs.x),
3✔
683
            y: self.y.wrapping_add_signed(rhs.y),
3✔
684
        }
685
    }
686

687
    /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`.
688
    ///
689
    /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.
690

691
    #[cfg(feature = "i64")]
692
    #[inline]
693
    #[must_use]
694
    pub const fn saturating_add_signed(self, rhs: I64Vec2) -> Self {
3✔
695
        Self {
696
            x: self.x.saturating_add_signed(rhs.x),
3✔
697
            y: self.y.saturating_add_signed(rhs.y),
3✔
698
        }
699
    }
700
}
701

702
impl Default for U64Vec2 {
703
    #[inline(always)]
704
    fn default() -> Self {
6✔
705
        Self::ZERO
×
706
    }
707
}
708

709
impl Div for U64Vec2 {
710
    type Output = Self;
711
    #[inline]
712
    fn div(self, rhs: Self) -> Self {
3✔
713
        Self {
714
            x: self.x.div(rhs.x),
3✔
715
            y: self.y.div(rhs.y),
3✔
716
        }
717
    }
718
}
719

720
impl Div<&Self> for U64Vec2 {
721
    type Output = Self;
722
    #[inline]
723
    fn div(self, rhs: &Self) -> Self {
3✔
724
        self.div(*rhs)
3✔
725
    }
726
}
727

728
impl Div<&U64Vec2> for &U64Vec2 {
729
    type Output = U64Vec2;
730
    #[inline]
731
    fn div(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
732
        (*self).div(*rhs)
3✔
733
    }
734
}
735

736
impl Div<U64Vec2> for &U64Vec2 {
737
    type Output = U64Vec2;
738
    #[inline]
739
    fn div(self, rhs: U64Vec2) -> U64Vec2 {
3✔
740
        (*self).div(rhs)
3✔
741
    }
742
}
743

744
impl DivAssign for U64Vec2 {
745
    #[inline]
746
    fn div_assign(&mut self, rhs: Self) {
3✔
747
        self.x.div_assign(rhs.x);
3✔
748
        self.y.div_assign(rhs.y);
5✔
749
    }
750
}
751

752
impl DivAssign<&Self> for U64Vec2 {
753
    #[inline]
754
    fn div_assign(&mut self, rhs: &Self) {
3✔
755
        self.div_assign(*rhs);
3✔
756
    }
757
}
758

759
impl Div<u64> for U64Vec2 {
760
    type Output = Self;
761
    #[inline]
762
    fn div(self, rhs: u64) -> Self {
6✔
763
        Self {
764
            x: self.x.div(rhs),
6✔
765
            y: self.y.div(rhs),
6✔
766
        }
767
    }
768
}
769

770
impl Div<&u64> for U64Vec2 {
771
    type Output = Self;
772
    #[inline]
773
    fn div(self, rhs: &u64) -> Self {
3✔
774
        self.div(*rhs)
3✔
775
    }
776
}
777

778
impl Div<&u64> for &U64Vec2 {
779
    type Output = U64Vec2;
780
    #[inline]
781
    fn div(self, rhs: &u64) -> U64Vec2 {
3✔
782
        (*self).div(*rhs)
3✔
783
    }
784
}
785

786
impl Div<u64> for &U64Vec2 {
787
    type Output = U64Vec2;
788
    #[inline]
789
    fn div(self, rhs: u64) -> U64Vec2 {
3✔
790
        (*self).div(rhs)
3✔
791
    }
792
}
793

794
impl DivAssign<u64> for U64Vec2 {
795
    #[inline]
796
    fn div_assign(&mut self, rhs: u64) {
3✔
797
        self.x.div_assign(rhs);
3✔
798
        self.y.div_assign(rhs);
5✔
799
    }
800
}
801

802
impl DivAssign<&u64> for U64Vec2 {
803
    #[inline]
804
    fn div_assign(&mut self, rhs: &u64) {
3✔
805
        self.div_assign(*rhs);
3✔
806
    }
807
}
808

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

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

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

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

844
impl Mul for U64Vec2 {
845
    type Output = Self;
846
    #[inline]
847
    fn mul(self, rhs: Self) -> Self {
3✔
848
        Self {
849
            x: self.x.mul(rhs.x),
3✔
850
            y: self.y.mul(rhs.y),
3✔
851
        }
852
    }
853
}
854

855
impl Mul<&Self> for U64Vec2 {
856
    type Output = Self;
857
    #[inline]
858
    fn mul(self, rhs: &Self) -> Self {
3✔
859
        self.mul(*rhs)
3✔
860
    }
861
}
862

863
impl Mul<&U64Vec2> for &U64Vec2 {
864
    type Output = U64Vec2;
865
    #[inline]
866
    fn mul(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
867
        (*self).mul(*rhs)
3✔
868
    }
869
}
870

871
impl Mul<U64Vec2> for &U64Vec2 {
872
    type Output = U64Vec2;
873
    #[inline]
874
    fn mul(self, rhs: U64Vec2) -> U64Vec2 {
3✔
875
        (*self).mul(rhs)
3✔
876
    }
877
}
878

879
impl MulAssign for U64Vec2 {
880
    #[inline]
881
    fn mul_assign(&mut self, rhs: Self) {
3✔
882
        self.x.mul_assign(rhs.x);
3✔
883
        self.y.mul_assign(rhs.y);
5✔
884
    }
885
}
886

887
impl MulAssign<&Self> for U64Vec2 {
888
    #[inline]
889
    fn mul_assign(&mut self, rhs: &Self) {
3✔
890
        self.mul_assign(*rhs);
3✔
891
    }
892
}
893

894
impl Mul<u64> for U64Vec2 {
895
    type Output = Self;
896
    #[inline]
897
    fn mul(self, rhs: u64) -> Self {
3✔
898
        Self {
899
            x: self.x.mul(rhs),
3✔
900
            y: self.y.mul(rhs),
3✔
901
        }
902
    }
903
}
904

905
impl Mul<&u64> for U64Vec2 {
906
    type Output = Self;
907
    #[inline]
908
    fn mul(self, rhs: &u64) -> Self {
3✔
909
        self.mul(*rhs)
3✔
910
    }
911
}
912

913
impl Mul<&u64> for &U64Vec2 {
914
    type Output = U64Vec2;
915
    #[inline]
916
    fn mul(self, rhs: &u64) -> U64Vec2 {
3✔
917
        (*self).mul(*rhs)
3✔
918
    }
919
}
920

921
impl Mul<u64> for &U64Vec2 {
922
    type Output = U64Vec2;
923
    #[inline]
924
    fn mul(self, rhs: u64) -> U64Vec2 {
3✔
925
        (*self).mul(rhs)
3✔
926
    }
927
}
928

929
impl MulAssign<u64> for U64Vec2 {
930
    #[inline]
931
    fn mul_assign(&mut self, rhs: u64) {
3✔
932
        self.x.mul_assign(rhs);
3✔
933
        self.y.mul_assign(rhs);
4✔
934
    }
935
}
936

937
impl MulAssign<&u64> for U64Vec2 {
938
    #[inline]
939
    fn mul_assign(&mut self, rhs: &u64) {
3✔
940
        self.mul_assign(*rhs);
3✔
941
    }
942
}
943

944
impl Mul<U64Vec2> for u64 {
945
    type Output = U64Vec2;
946
    #[inline]
947
    fn mul(self, rhs: U64Vec2) -> U64Vec2 {
3✔
948
        U64Vec2 {
949
            x: self.mul(rhs.x),
3✔
950
            y: self.mul(rhs.y),
3✔
951
        }
952
    }
953
}
954

955
impl Mul<&U64Vec2> for u64 {
956
    type Output = U64Vec2;
957
    #[inline]
958
    fn mul(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
959
        self.mul(*rhs)
3✔
960
    }
961
}
962

963
impl Mul<&U64Vec2> for &u64 {
964
    type Output = U64Vec2;
965
    #[inline]
966
    fn mul(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
967
        (*self).mul(*rhs)
3✔
968
    }
969
}
970

971
impl Mul<U64Vec2> for &u64 {
972
    type Output = U64Vec2;
973
    #[inline]
974
    fn mul(self, rhs: U64Vec2) -> U64Vec2 {
3✔
975
        (*self).mul(rhs)
3✔
976
    }
977
}
978

979
impl Add for U64Vec2 {
980
    type Output = Self;
981
    #[inline]
982
    fn add(self, rhs: Self) -> Self {
3✔
983
        Self {
984
            x: self.x.add(rhs.x),
4✔
985
            y: self.y.add(rhs.y),
4✔
986
        }
987
    }
988
}
989

990
impl Add<&Self> for U64Vec2 {
991
    type Output = Self;
992
    #[inline]
993
    fn add(self, rhs: &Self) -> Self {
3✔
994
        self.add(*rhs)
3✔
995
    }
996
}
997

998
impl Add<&U64Vec2> for &U64Vec2 {
999
    type Output = U64Vec2;
1000
    #[inline]
1001
    fn add(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1002
        (*self).add(*rhs)
3✔
1003
    }
1004
}
1005

1006
impl Add<U64Vec2> for &U64Vec2 {
1007
    type Output = U64Vec2;
1008
    #[inline]
1009
    fn add(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1010
        (*self).add(rhs)
3✔
1011
    }
1012
}
1013

1014
impl AddAssign for U64Vec2 {
1015
    #[inline]
1016
    fn add_assign(&mut self, rhs: Self) {
3✔
1017
        self.x.add_assign(rhs.x);
3✔
1018
        self.y.add_assign(rhs.y);
5✔
1019
    }
1020
}
1021

1022
impl AddAssign<&Self> for U64Vec2 {
1023
    #[inline]
1024
    fn add_assign(&mut self, rhs: &Self) {
3✔
1025
        self.add_assign(*rhs);
3✔
1026
    }
1027
}
1028

1029
impl Add<u64> for U64Vec2 {
1030
    type Output = Self;
1031
    #[inline]
1032
    fn add(self, rhs: u64) -> Self {
3✔
1033
        Self {
1034
            x: self.x.add(rhs),
3✔
1035
            y: self.y.add(rhs),
3✔
1036
        }
1037
    }
1038
}
1039

1040
impl Add<&u64> for U64Vec2 {
1041
    type Output = Self;
1042
    #[inline]
1043
    fn add(self, rhs: &u64) -> Self {
3✔
1044
        self.add(*rhs)
3✔
1045
    }
1046
}
1047

1048
impl Add<&u64> for &U64Vec2 {
1049
    type Output = U64Vec2;
1050
    #[inline]
1051
    fn add(self, rhs: &u64) -> U64Vec2 {
3✔
1052
        (*self).add(*rhs)
3✔
1053
    }
1054
}
1055

1056
impl Add<u64> for &U64Vec2 {
1057
    type Output = U64Vec2;
1058
    #[inline]
1059
    fn add(self, rhs: u64) -> U64Vec2 {
3✔
1060
        (*self).add(rhs)
3✔
1061
    }
1062
}
1063

1064
impl AddAssign<u64> for U64Vec2 {
1065
    #[inline]
1066
    fn add_assign(&mut self, rhs: u64) {
3✔
1067
        self.x.add_assign(rhs);
3✔
1068
        self.y.add_assign(rhs);
3✔
1069
    }
1070
}
1071

1072
impl AddAssign<&u64> for U64Vec2 {
1073
    #[inline]
1074
    fn add_assign(&mut self, rhs: &u64) {
3✔
1075
        self.add_assign(*rhs);
3✔
1076
    }
1077
}
1078

1079
impl Add<U64Vec2> for u64 {
1080
    type Output = U64Vec2;
1081
    #[inline]
1082
    fn add(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1083
        U64Vec2 {
1084
            x: self.add(rhs.x),
3✔
1085
            y: self.add(rhs.y),
3✔
1086
        }
1087
    }
1088
}
1089

1090
impl Add<&U64Vec2> for u64 {
1091
    type Output = U64Vec2;
1092
    #[inline]
1093
    fn add(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1094
        self.add(*rhs)
3✔
1095
    }
1096
}
1097

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

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

1114
impl Sub for U64Vec2 {
1115
    type Output = Self;
1116
    #[inline]
1117
    fn sub(self, rhs: Self) -> Self {
3✔
1118
        Self {
1119
            x: self.x.sub(rhs.x),
3✔
1120
            y: self.y.sub(rhs.y),
3✔
1121
        }
1122
    }
1123
}
1124

1125
impl Sub<&Self> for U64Vec2 {
1126
    type Output = Self;
1127
    #[inline]
1128
    fn sub(self, rhs: &Self) -> Self {
3✔
1129
        self.sub(*rhs)
3✔
1130
    }
1131
}
1132

1133
impl Sub<&U64Vec2> for &U64Vec2 {
1134
    type Output = U64Vec2;
1135
    #[inline]
1136
    fn sub(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1137
        (*self).sub(*rhs)
3✔
1138
    }
1139
}
1140

1141
impl Sub<U64Vec2> for &U64Vec2 {
1142
    type Output = U64Vec2;
1143
    #[inline]
1144
    fn sub(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1145
        (*self).sub(rhs)
3✔
1146
    }
1147
}
1148

1149
impl SubAssign for U64Vec2 {
1150
    #[inline]
1151
    fn sub_assign(&mut self, rhs: Self) {
3✔
1152
        self.x.sub_assign(rhs.x);
3✔
1153
        self.y.sub_assign(rhs.y);
5✔
1154
    }
1155
}
1156

1157
impl SubAssign<&Self> for U64Vec2 {
1158
    #[inline]
1159
    fn sub_assign(&mut self, rhs: &Self) {
3✔
1160
        self.sub_assign(*rhs);
3✔
1161
    }
1162
}
1163

1164
impl Sub<u64> for U64Vec2 {
1165
    type Output = Self;
1166
    #[inline]
1167
    fn sub(self, rhs: u64) -> Self {
3✔
1168
        Self {
1169
            x: self.x.sub(rhs),
3✔
1170
            y: self.y.sub(rhs),
4✔
1171
        }
1172
    }
1173
}
1174

1175
impl Sub<&u64> for U64Vec2 {
1176
    type Output = Self;
1177
    #[inline]
1178
    fn sub(self, rhs: &u64) -> Self {
3✔
1179
        self.sub(*rhs)
3✔
1180
    }
1181
}
1182

1183
impl Sub<&u64> for &U64Vec2 {
1184
    type Output = U64Vec2;
1185
    #[inline]
1186
    fn sub(self, rhs: &u64) -> U64Vec2 {
3✔
1187
        (*self).sub(*rhs)
3✔
1188
    }
1189
}
1190

1191
impl Sub<u64> for &U64Vec2 {
1192
    type Output = U64Vec2;
1193
    #[inline]
1194
    fn sub(self, rhs: u64) -> U64Vec2 {
3✔
1195
        (*self).sub(rhs)
3✔
1196
    }
1197
}
1198

1199
impl SubAssign<u64> for U64Vec2 {
1200
    #[inline]
1201
    fn sub_assign(&mut self, rhs: u64) {
3✔
1202
        self.x.sub_assign(rhs);
3✔
1203
        self.y.sub_assign(rhs);
3✔
1204
    }
1205
}
1206

1207
impl SubAssign<&u64> for U64Vec2 {
1208
    #[inline]
1209
    fn sub_assign(&mut self, rhs: &u64) {
3✔
1210
        self.sub_assign(*rhs);
3✔
1211
    }
1212
}
1213

1214
impl Sub<U64Vec2> for u64 {
1215
    type Output = U64Vec2;
1216
    #[inline]
1217
    fn sub(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1218
        U64Vec2 {
1219
            x: self.sub(rhs.x),
3✔
1220
            y: self.sub(rhs.y),
3✔
1221
        }
1222
    }
1223
}
1224

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

1233
impl Sub<&U64Vec2> for &u64 {
1234
    type Output = U64Vec2;
1235
    #[inline]
1236
    fn sub(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1237
        (*self).sub(*rhs)
3✔
1238
    }
1239
}
1240

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

1249
impl Rem for U64Vec2 {
1250
    type Output = Self;
1251
    #[inline]
1252
    fn rem(self, rhs: Self) -> Self {
3✔
1253
        Self {
1254
            x: self.x.rem(rhs.x),
3✔
1255
            y: self.y.rem(rhs.y),
3✔
1256
        }
1257
    }
1258
}
1259

1260
impl Rem<&Self> for U64Vec2 {
1261
    type Output = Self;
1262
    #[inline]
1263
    fn rem(self, rhs: &Self) -> Self {
3✔
1264
        self.rem(*rhs)
3✔
1265
    }
1266
}
1267

1268
impl Rem<&U64Vec2> for &U64Vec2 {
1269
    type Output = U64Vec2;
1270
    #[inline]
1271
    fn rem(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1272
        (*self).rem(*rhs)
3✔
1273
    }
1274
}
1275

1276
impl Rem<U64Vec2> for &U64Vec2 {
1277
    type Output = U64Vec2;
1278
    #[inline]
1279
    fn rem(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1280
        (*self).rem(rhs)
3✔
1281
    }
1282
}
1283

1284
impl RemAssign for U64Vec2 {
1285
    #[inline]
1286
    fn rem_assign(&mut self, rhs: Self) {
3✔
1287
        self.x.rem_assign(rhs.x);
5✔
1288
        self.y.rem_assign(rhs.y);
5✔
1289
    }
1290
}
1291

1292
impl RemAssign<&Self> for U64Vec2 {
1293
    #[inline]
1294
    fn rem_assign(&mut self, rhs: &Self) {
3✔
1295
        self.rem_assign(*rhs);
3✔
1296
    }
1297
}
1298

1299
impl Rem<u64> for U64Vec2 {
1300
    type Output = Self;
1301
    #[inline]
1302
    fn rem(self, rhs: u64) -> Self {
3✔
1303
        Self {
1304
            x: self.x.rem(rhs),
3✔
1305
            y: self.y.rem(rhs),
3✔
1306
        }
1307
    }
1308
}
1309

1310
impl Rem<&u64> for U64Vec2 {
1311
    type Output = Self;
1312
    #[inline]
1313
    fn rem(self, rhs: &u64) -> Self {
3✔
1314
        self.rem(*rhs)
3✔
1315
    }
1316
}
1317

1318
impl Rem<&u64> for &U64Vec2 {
1319
    type Output = U64Vec2;
1320
    #[inline]
1321
    fn rem(self, rhs: &u64) -> U64Vec2 {
3✔
1322
        (*self).rem(*rhs)
3✔
1323
    }
1324
}
1325

1326
impl Rem<u64> for &U64Vec2 {
1327
    type Output = U64Vec2;
1328
    #[inline]
1329
    fn rem(self, rhs: u64) -> U64Vec2 {
3✔
1330
        (*self).rem(rhs)
3✔
1331
    }
1332
}
1333

1334
impl RemAssign<u64> for U64Vec2 {
1335
    #[inline]
1336
    fn rem_assign(&mut self, rhs: u64) {
3✔
1337
        self.x.rem_assign(rhs);
3✔
1338
        self.y.rem_assign(rhs);
5✔
1339
    }
1340
}
1341

1342
impl RemAssign<&u64> for U64Vec2 {
1343
    #[inline]
1344
    fn rem_assign(&mut self, rhs: &u64) {
3✔
1345
        self.rem_assign(*rhs);
3✔
1346
    }
1347
}
1348

1349
impl Rem<U64Vec2> for u64 {
1350
    type Output = U64Vec2;
1351
    #[inline]
1352
    fn rem(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1353
        U64Vec2 {
1354
            x: self.rem(rhs.x),
3✔
1355
            y: self.rem(rhs.y),
3✔
1356
        }
1357
    }
1358
}
1359

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

1368
impl Rem<&U64Vec2> for &u64 {
1369
    type Output = U64Vec2;
1370
    #[inline]
1371
    fn rem(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1372
        (*self).rem(*rhs)
3✔
1373
    }
1374
}
1375

1376
impl Rem<U64Vec2> for &u64 {
1377
    type Output = U64Vec2;
1378
    #[inline]
1379
    fn rem(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1380
        (*self).rem(rhs)
3✔
1381
    }
1382
}
1383

1384
impl AsRef<[u64; 2]> for U64Vec2 {
1385
    #[inline]
1386
    fn as_ref(&self) -> &[u64; 2] {
3✔
1387
        unsafe { &*(self as *const Self as *const [u64; 2]) }
3✔
1388
    }
1389
}
1390

1391
impl AsMut<[u64; 2]> for U64Vec2 {
1392
    #[inline]
1393
    fn as_mut(&mut self) -> &mut [u64; 2] {
3✔
1394
        unsafe { &mut *(self as *mut Self as *mut [u64; 2]) }
3✔
1395
    }
1396
}
1397

1398
impl Sum for U64Vec2 {
1399
    #[inline]
1400
    fn sum<I>(iter: I) -> Self
3✔
1401
    where
1402
        I: Iterator<Item = Self>,
1403
    {
1404
        iter.fold(Self::ZERO, Self::add)
3✔
1405
    }
1406
}
1407

1408
impl<'a> Sum<&'a Self> for U64Vec2 {
1409
    #[inline]
1410
    fn sum<I>(iter: I) -> Self
3✔
1411
    where
1412
        I: Iterator<Item = &'a Self>,
1413
    {
1414
        iter.fold(Self::ZERO, |a, &b| Self::add(a, b))
9✔
1415
    }
1416
}
1417

1418
impl Product for U64Vec2 {
1419
    #[inline]
1420
    fn product<I>(iter: I) -> Self
3✔
1421
    where
1422
        I: Iterator<Item = Self>,
1423
    {
1424
        iter.fold(Self::ONE, Self::mul)
3✔
1425
    }
1426
}
1427

1428
impl<'a> Product<&'a Self> for U64Vec2 {
1429
    #[inline]
1430
    fn product<I>(iter: I) -> Self
3✔
1431
    where
1432
        I: Iterator<Item = &'a Self>,
1433
    {
1434
        iter.fold(Self::ONE, |a, &b| Self::mul(a, b))
9✔
1435
    }
1436
}
1437

1438
impl Not for U64Vec2 {
1439
    type Output = Self;
1440
    #[inline]
1441
    fn not(self) -> Self {
3✔
1442
        Self {
1443
            x: self.x.not(),
3✔
1444
            y: self.y.not(),
3✔
1445
        }
1446
    }
1447
}
1448

1449
impl Not for &U64Vec2 {
1450
    type Output = U64Vec2;
1451
    #[inline]
1452
    fn not(self) -> U64Vec2 {
3✔
1453
        (*self).not()
3✔
1454
    }
1455
}
1456

1457
impl BitAnd for U64Vec2 {
1458
    type Output = Self;
1459
    #[inline]
1460
    fn bitand(self, rhs: Self) -> Self::Output {
3✔
1461
        Self {
1462
            x: self.x.bitand(rhs.x),
3✔
1463
            y: self.y.bitand(rhs.y),
3✔
1464
        }
1465
    }
1466
}
1467

1468
impl BitAnd<&Self> for U64Vec2 {
1469
    type Output = Self;
1470
    #[inline]
1471
    fn bitand(self, rhs: &Self) -> Self {
3✔
1472
        self.bitand(*rhs)
3✔
1473
    }
1474
}
1475

1476
impl BitAnd<&U64Vec2> for &U64Vec2 {
1477
    type Output = U64Vec2;
1478
    #[inline]
1479
    fn bitand(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1480
        (*self).bitand(*rhs)
3✔
1481
    }
1482
}
1483

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

1492
impl BitAndAssign for U64Vec2 {
1493
    #[inline]
1494
    fn bitand_assign(&mut self, rhs: Self) {
3✔
1495
        *self = self.bitand(rhs);
3✔
1496
    }
1497
}
1498

1499
impl BitAndAssign<&Self> for U64Vec2 {
1500
    #[inline]
1501
    fn bitand_assign(&mut self, rhs: &Self) {
3✔
1502
        self.bitand_assign(*rhs);
3✔
1503
    }
1504
}
1505

1506
impl BitOr for U64Vec2 {
1507
    type Output = Self;
1508
    #[inline]
1509
    fn bitor(self, rhs: Self) -> Self::Output {
3✔
1510
        Self {
1511
            x: self.x.bitor(rhs.x),
3✔
1512
            y: self.y.bitor(rhs.y),
3✔
1513
        }
1514
    }
1515
}
1516

1517
impl BitOr<&Self> for U64Vec2 {
1518
    type Output = Self;
1519
    #[inline]
1520
    fn bitor(self, rhs: &Self) -> Self {
3✔
1521
        self.bitor(*rhs)
3✔
1522
    }
1523
}
1524

1525
impl BitOr<&U64Vec2> for &U64Vec2 {
1526
    type Output = U64Vec2;
1527
    #[inline]
1528
    fn bitor(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1529
        (*self).bitor(*rhs)
3✔
1530
    }
1531
}
1532

1533
impl BitOr<U64Vec2> for &U64Vec2 {
1534
    type Output = U64Vec2;
1535
    #[inline]
1536
    fn bitor(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1537
        (*self).bitor(rhs)
3✔
1538
    }
1539
}
1540

1541
impl BitOrAssign for U64Vec2 {
1542
    #[inline]
1543
    fn bitor_assign(&mut self, rhs: Self) {
3✔
1544
        *self = self.bitor(rhs);
3✔
1545
    }
1546
}
1547

1548
impl BitOrAssign<&Self> for U64Vec2 {
1549
    #[inline]
1550
    fn bitor_assign(&mut self, rhs: &Self) {
3✔
1551
        self.bitor_assign(*rhs);
3✔
1552
    }
1553
}
1554

1555
impl BitXor for U64Vec2 {
1556
    type Output = Self;
1557
    #[inline]
1558
    fn bitxor(self, rhs: Self) -> Self::Output {
3✔
1559
        Self {
1560
            x: self.x.bitxor(rhs.x),
3✔
1561
            y: self.y.bitxor(rhs.y),
3✔
1562
        }
1563
    }
1564
}
1565

1566
impl BitXor<&Self> for U64Vec2 {
1567
    type Output = Self;
1568
    #[inline]
1569
    fn bitxor(self, rhs: &Self) -> Self {
3✔
1570
        self.bitxor(*rhs)
3✔
1571
    }
1572
}
1573

1574
impl BitXor<&U64Vec2> for &U64Vec2 {
1575
    type Output = U64Vec2;
1576
    #[inline]
1577
    fn bitxor(self, rhs: &U64Vec2) -> U64Vec2 {
3✔
1578
        (*self).bitxor(*rhs)
3✔
1579
    }
1580
}
1581

1582
impl BitXor<U64Vec2> for &U64Vec2 {
1583
    type Output = U64Vec2;
1584
    #[inline]
1585
    fn bitxor(self, rhs: U64Vec2) -> U64Vec2 {
3✔
1586
        (*self).bitxor(rhs)
3✔
1587
    }
1588
}
1589

1590
impl BitXorAssign for U64Vec2 {
1591
    #[inline]
1592
    fn bitxor_assign(&mut self, rhs: Self) {
3✔
1593
        *self = self.bitxor(rhs);
3✔
1594
    }
1595
}
1596

1597
impl BitXorAssign<&Self> for U64Vec2 {
1598
    #[inline]
1599
    fn bitxor_assign(&mut self, rhs: &Self) {
3✔
1600
        self.bitxor_assign(*rhs);
3✔
1601
    }
1602
}
1603

1604
impl BitAnd<u64> for U64Vec2 {
1605
    type Output = Self;
1606
    #[inline]
1607
    fn bitand(self, rhs: u64) -> Self::Output {
3✔
1608
        Self {
1609
            x: self.x.bitand(rhs),
3✔
1610
            y: self.y.bitand(rhs),
3✔
1611
        }
1612
    }
1613
}
1614

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

1623
impl BitAnd<&u64> for &U64Vec2 {
1624
    type Output = U64Vec2;
1625
    #[inline]
1626
    fn bitand(self, rhs: &u64) -> U64Vec2 {
3✔
1627
        (*self).bitand(*rhs)
3✔
1628
    }
1629
}
1630

1631
impl BitAnd<u64> for &U64Vec2 {
1632
    type Output = U64Vec2;
1633
    #[inline]
1634
    fn bitand(self, rhs: u64) -> U64Vec2 {
3✔
1635
        (*self).bitand(rhs)
3✔
1636
    }
1637
}
1638

1639
impl BitAndAssign<u64> for U64Vec2 {
1640
    #[inline]
1641
    fn bitand_assign(&mut self, rhs: u64) {
3✔
1642
        *self = self.bitand(rhs);
3✔
1643
    }
1644
}
1645

1646
impl BitAndAssign<&u64> for U64Vec2 {
1647
    #[inline]
1648
    fn bitand_assign(&mut self, rhs: &u64) {
3✔
1649
        self.bitand_assign(*rhs);
3✔
1650
    }
1651
}
1652

1653
impl BitOr<u64> for U64Vec2 {
1654
    type Output = Self;
1655
    #[inline]
1656
    fn bitor(self, rhs: u64) -> Self::Output {
3✔
1657
        Self {
1658
            x: self.x.bitor(rhs),
3✔
1659
            y: self.y.bitor(rhs),
3✔
1660
        }
1661
    }
1662
}
1663

1664
impl BitOr<&u64> for U64Vec2 {
1665
    type Output = Self;
1666
    #[inline]
1667
    fn bitor(self, rhs: &u64) -> Self {
3✔
1668
        self.bitor(*rhs)
3✔
1669
    }
1670
}
1671

1672
impl BitOr<&u64> for &U64Vec2 {
1673
    type Output = U64Vec2;
1674
    #[inline]
1675
    fn bitor(self, rhs: &u64) -> U64Vec2 {
3✔
1676
        (*self).bitor(*rhs)
3✔
1677
    }
1678
}
1679

1680
impl BitOr<u64> for &U64Vec2 {
1681
    type Output = U64Vec2;
1682
    #[inline]
1683
    fn bitor(self, rhs: u64) -> U64Vec2 {
3✔
1684
        (*self).bitor(rhs)
3✔
1685
    }
1686
}
1687

1688
impl BitOrAssign<u64> for U64Vec2 {
1689
    #[inline]
1690
    fn bitor_assign(&mut self, rhs: u64) {
3✔
1691
        *self = self.bitor(rhs);
3✔
1692
    }
1693
}
1694

1695
impl BitOrAssign<&u64> for U64Vec2 {
1696
    #[inline]
1697
    fn bitor_assign(&mut self, rhs: &u64) {
3✔
1698
        self.bitor_assign(*rhs);
3✔
1699
    }
1700
}
1701

1702
impl BitXor<u64> for U64Vec2 {
1703
    type Output = Self;
1704
    #[inline]
1705
    fn bitxor(self, rhs: u64) -> Self::Output {
3✔
1706
        Self {
1707
            x: self.x.bitxor(rhs),
3✔
1708
            y: self.y.bitxor(rhs),
3✔
1709
        }
1710
    }
1711
}
1712

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

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

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

1737
impl BitXorAssign<u64> for U64Vec2 {
1738
    #[inline]
1739
    fn bitxor_assign(&mut self, rhs: u64) {
3✔
1740
        *self = self.bitxor(rhs);
3✔
1741
    }
1742
}
1743

1744
impl BitXorAssign<&u64> for U64Vec2 {
1745
    #[inline]
1746
    fn bitxor_assign(&mut self, rhs: &u64) {
3✔
1747
        self.bitxor_assign(*rhs);
3✔
1748
    }
1749
}
1750

1751
impl Shl<i8> for U64Vec2 {
1752
    type Output = Self;
1753
    #[inline]
1754
    fn shl(self, rhs: i8) -> Self::Output {
3✔
1755
        Self {
1756
            x: self.x.shl(rhs),
3✔
1757
            y: self.y.shl(rhs),
3✔
1758
        }
1759
    }
1760
}
1761

1762
impl Shl<&i8> for U64Vec2 {
1763
    type Output = Self;
1764
    #[inline]
1765
    fn shl(self, rhs: &i8) -> Self {
3✔
1766
        self.shl(*rhs)
3✔
1767
    }
1768
}
1769

1770
impl Shl<&i8> for &U64Vec2 {
1771
    type Output = U64Vec2;
1772
    #[inline]
1773
    fn shl(self, rhs: &i8) -> U64Vec2 {
3✔
1774
        (*self).shl(*rhs)
3✔
1775
    }
1776
}
1777

1778
impl Shl<i8> for &U64Vec2 {
1779
    type Output = U64Vec2;
1780
    #[inline]
1781
    fn shl(self, rhs: i8) -> U64Vec2 {
3✔
1782
        (*self).shl(rhs)
3✔
1783
    }
1784
}
1785

1786
impl ShlAssign<i8> for U64Vec2 {
1787
    #[inline]
1788
    fn shl_assign(&mut self, rhs: i8) {
3✔
1789
        *self = self.shl(rhs);
3✔
1790
    }
1791
}
1792

1793
impl ShlAssign<&i8> for U64Vec2 {
1794
    #[inline]
1795
    fn shl_assign(&mut self, rhs: &i8) {
3✔
1796
        self.shl_assign(*rhs);
3✔
1797
    }
1798
}
1799

1800
impl Shr<i8> for U64Vec2 {
1801
    type Output = Self;
1802
    #[inline]
1803
    fn shr(self, rhs: i8) -> Self::Output {
3✔
1804
        Self {
1805
            x: self.x.shr(rhs),
3✔
1806
            y: self.y.shr(rhs),
3✔
1807
        }
1808
    }
1809
}
1810

1811
impl Shr<&i8> for U64Vec2 {
1812
    type Output = Self;
1813
    #[inline]
1814
    fn shr(self, rhs: &i8) -> Self {
3✔
1815
        self.shr(*rhs)
3✔
1816
    }
1817
}
1818

1819
impl Shr<&i8> for &U64Vec2 {
1820
    type Output = U64Vec2;
1821
    #[inline]
1822
    fn shr(self, rhs: &i8) -> U64Vec2 {
3✔
1823
        (*self).shr(*rhs)
3✔
1824
    }
1825
}
1826

1827
impl Shr<i8> for &U64Vec2 {
1828
    type Output = U64Vec2;
1829
    #[inline]
1830
    fn shr(self, rhs: i8) -> U64Vec2 {
3✔
1831
        (*self).shr(rhs)
3✔
1832
    }
1833
}
1834

1835
impl ShrAssign<i8> for U64Vec2 {
1836
    #[inline]
1837
    fn shr_assign(&mut self, rhs: i8) {
3✔
1838
        *self = self.shr(rhs);
3✔
1839
    }
1840
}
1841

1842
impl ShrAssign<&i8> for U64Vec2 {
1843
    #[inline]
1844
    fn shr_assign(&mut self, rhs: &i8) {
3✔
1845
        self.shr_assign(*rhs);
3✔
1846
    }
1847
}
1848

1849
impl Shl<i16> for U64Vec2 {
1850
    type Output = Self;
1851
    #[inline]
1852
    fn shl(self, rhs: i16) -> Self::Output {
3✔
1853
        Self {
1854
            x: self.x.shl(rhs),
3✔
1855
            y: self.y.shl(rhs),
3✔
1856
        }
1857
    }
1858
}
1859

1860
impl Shl<&i16> for U64Vec2 {
1861
    type Output = Self;
1862
    #[inline]
1863
    fn shl(self, rhs: &i16) -> Self {
3✔
1864
        self.shl(*rhs)
3✔
1865
    }
1866
}
1867

1868
impl Shl<&i16> for &U64Vec2 {
1869
    type Output = U64Vec2;
1870
    #[inline]
1871
    fn shl(self, rhs: &i16) -> U64Vec2 {
3✔
1872
        (*self).shl(*rhs)
3✔
1873
    }
1874
}
1875

1876
impl Shl<i16> for &U64Vec2 {
1877
    type Output = U64Vec2;
1878
    #[inline]
1879
    fn shl(self, rhs: i16) -> U64Vec2 {
3✔
1880
        (*self).shl(rhs)
3✔
1881
    }
1882
}
1883

1884
impl ShlAssign<i16> for U64Vec2 {
1885
    #[inline]
1886
    fn shl_assign(&mut self, rhs: i16) {
3✔
1887
        *self = self.shl(rhs);
3✔
1888
    }
1889
}
1890

1891
impl ShlAssign<&i16> for U64Vec2 {
1892
    #[inline]
1893
    fn shl_assign(&mut self, rhs: &i16) {
3✔
1894
        self.shl_assign(*rhs);
3✔
1895
    }
1896
}
1897

1898
impl Shr<i16> for U64Vec2 {
1899
    type Output = Self;
1900
    #[inline]
1901
    fn shr(self, rhs: i16) -> Self::Output {
3✔
1902
        Self {
1903
            x: self.x.shr(rhs),
3✔
1904
            y: self.y.shr(rhs),
3✔
1905
        }
1906
    }
1907
}
1908

1909
impl Shr<&i16> for U64Vec2 {
1910
    type Output = Self;
1911
    #[inline]
1912
    fn shr(self, rhs: &i16) -> Self {
3✔
1913
        self.shr(*rhs)
3✔
1914
    }
1915
}
1916

1917
impl Shr<&i16> for &U64Vec2 {
1918
    type Output = U64Vec2;
1919
    #[inline]
1920
    fn shr(self, rhs: &i16) -> U64Vec2 {
3✔
1921
        (*self).shr(*rhs)
3✔
1922
    }
1923
}
1924

1925
impl Shr<i16> for &U64Vec2 {
1926
    type Output = U64Vec2;
1927
    #[inline]
1928
    fn shr(self, rhs: i16) -> U64Vec2 {
3✔
1929
        (*self).shr(rhs)
3✔
1930
    }
1931
}
1932

1933
impl ShrAssign<i16> for U64Vec2 {
1934
    #[inline]
1935
    fn shr_assign(&mut self, rhs: i16) {
3✔
1936
        *self = self.shr(rhs);
3✔
1937
    }
1938
}
1939

1940
impl ShrAssign<&i16> for U64Vec2 {
1941
    #[inline]
1942
    fn shr_assign(&mut self, rhs: &i16) {
3✔
1943
        self.shr_assign(*rhs);
3✔
1944
    }
1945
}
1946

1947
impl Shl<i32> for U64Vec2 {
1948
    type Output = Self;
1949
    #[inline]
1950
    fn shl(self, rhs: i32) -> Self::Output {
3✔
1951
        Self {
1952
            x: self.x.shl(rhs),
3✔
1953
            y: self.y.shl(rhs),
3✔
1954
        }
1955
    }
1956
}
1957

1958
impl Shl<&i32> for U64Vec2 {
1959
    type Output = Self;
1960
    #[inline]
1961
    fn shl(self, rhs: &i32) -> Self {
3✔
1962
        self.shl(*rhs)
3✔
1963
    }
1964
}
1965

1966
impl Shl<&i32> for &U64Vec2 {
1967
    type Output = U64Vec2;
1968
    #[inline]
1969
    fn shl(self, rhs: &i32) -> U64Vec2 {
3✔
1970
        (*self).shl(*rhs)
3✔
1971
    }
1972
}
1973

1974
impl Shl<i32> for &U64Vec2 {
1975
    type Output = U64Vec2;
1976
    #[inline]
1977
    fn shl(self, rhs: i32) -> U64Vec2 {
3✔
1978
        (*self).shl(rhs)
3✔
1979
    }
1980
}
1981

1982
impl ShlAssign<i32> for U64Vec2 {
1983
    #[inline]
1984
    fn shl_assign(&mut self, rhs: i32) {
3✔
1985
        *self = self.shl(rhs);
3✔
1986
    }
1987
}
1988

1989
impl ShlAssign<&i32> for U64Vec2 {
1990
    #[inline]
1991
    fn shl_assign(&mut self, rhs: &i32) {
3✔
1992
        self.shl_assign(*rhs);
3✔
1993
    }
1994
}
1995

1996
impl Shr<i32> for U64Vec2 {
1997
    type Output = Self;
1998
    #[inline]
1999
    fn shr(self, rhs: i32) -> Self::Output {
3✔
2000
        Self {
2001
            x: self.x.shr(rhs),
3✔
2002
            y: self.y.shr(rhs),
3✔
2003
        }
2004
    }
2005
}
2006

2007
impl Shr<&i32> for U64Vec2 {
2008
    type Output = Self;
2009
    #[inline]
2010
    fn shr(self, rhs: &i32) -> Self {
3✔
2011
        self.shr(*rhs)
3✔
2012
    }
2013
}
2014

2015
impl Shr<&i32> for &U64Vec2 {
2016
    type Output = U64Vec2;
2017
    #[inline]
2018
    fn shr(self, rhs: &i32) -> U64Vec2 {
3✔
2019
        (*self).shr(*rhs)
3✔
2020
    }
2021
}
2022

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

2031
impl ShrAssign<i32> for U64Vec2 {
2032
    #[inline]
2033
    fn shr_assign(&mut self, rhs: i32) {
3✔
2034
        *self = self.shr(rhs);
3✔
2035
    }
2036
}
2037

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

2045
impl Shl<i64> for U64Vec2 {
2046
    type Output = Self;
2047
    #[inline]
2048
    fn shl(self, rhs: i64) -> Self::Output {
3✔
2049
        Self {
2050
            x: self.x.shl(rhs),
3✔
2051
            y: self.y.shl(rhs),
3✔
2052
        }
2053
    }
2054
}
2055

2056
impl Shl<&i64> for U64Vec2 {
2057
    type Output = Self;
2058
    #[inline]
2059
    fn shl(self, rhs: &i64) -> Self {
3✔
2060
        self.shl(*rhs)
3✔
2061
    }
2062
}
2063

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

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

2080
impl ShlAssign<i64> for U64Vec2 {
2081
    #[inline]
2082
    fn shl_assign(&mut self, rhs: i64) {
3✔
2083
        *self = self.shl(rhs);
3✔
2084
    }
2085
}
2086

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

2094
impl Shr<i64> for U64Vec2 {
2095
    type Output = Self;
2096
    #[inline]
2097
    fn shr(self, rhs: i64) -> Self::Output {
3✔
2098
        Self {
2099
            x: self.x.shr(rhs),
3✔
2100
            y: self.y.shr(rhs),
3✔
2101
        }
2102
    }
2103
}
2104

2105
impl Shr<&i64> for U64Vec2 {
2106
    type Output = Self;
2107
    #[inline]
2108
    fn shr(self, rhs: &i64) -> Self {
3✔
2109
        self.shr(*rhs)
3✔
2110
    }
2111
}
2112

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

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

2129
impl ShrAssign<i64> for U64Vec2 {
2130
    #[inline]
2131
    fn shr_assign(&mut self, rhs: i64) {
3✔
2132
        *self = self.shr(rhs);
3✔
2133
    }
2134
}
2135

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

2143
impl Shl<u8> for U64Vec2 {
2144
    type Output = Self;
2145
    #[inline]
2146
    fn shl(self, rhs: u8) -> Self::Output {
3✔
2147
        Self {
2148
            x: self.x.shl(rhs),
3✔
2149
            y: self.y.shl(rhs),
3✔
2150
        }
2151
    }
2152
}
2153

2154
impl Shl<&u8> for U64Vec2 {
2155
    type Output = Self;
2156
    #[inline]
2157
    fn shl(self, rhs: &u8) -> Self {
3✔
2158
        self.shl(*rhs)
3✔
2159
    }
2160
}
2161

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

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

2178
impl ShlAssign<u8> for U64Vec2 {
2179
    #[inline]
2180
    fn shl_assign(&mut self, rhs: u8) {
3✔
2181
        *self = self.shl(rhs);
3✔
2182
    }
2183
}
2184

2185
impl ShlAssign<&u8> for U64Vec2 {
2186
    #[inline]
2187
    fn shl_assign(&mut self, rhs: &u8) {
3✔
2188
        self.shl_assign(*rhs);
3✔
2189
    }
2190
}
2191

2192
impl Shr<u8> for U64Vec2 {
2193
    type Output = Self;
2194
    #[inline]
2195
    fn shr(self, rhs: u8) -> Self::Output {
3✔
2196
        Self {
2197
            x: self.x.shr(rhs),
3✔
2198
            y: self.y.shr(rhs),
3✔
2199
        }
2200
    }
2201
}
2202

2203
impl Shr<&u8> for U64Vec2 {
2204
    type Output = Self;
2205
    #[inline]
2206
    fn shr(self, rhs: &u8) -> Self {
3✔
2207
        self.shr(*rhs)
3✔
2208
    }
2209
}
2210

2211
impl Shr<&u8> for &U64Vec2 {
2212
    type Output = U64Vec2;
2213
    #[inline]
2214
    fn shr(self, rhs: &u8) -> U64Vec2 {
3✔
2215
        (*self).shr(*rhs)
3✔
2216
    }
2217
}
2218

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

2227
impl ShrAssign<u8> for U64Vec2 {
2228
    #[inline]
2229
    fn shr_assign(&mut self, rhs: u8) {
3✔
2230
        *self = self.shr(rhs);
3✔
2231
    }
2232
}
2233

2234
impl ShrAssign<&u8> for U64Vec2 {
2235
    #[inline]
2236
    fn shr_assign(&mut self, rhs: &u8) {
3✔
2237
        self.shr_assign(*rhs);
3✔
2238
    }
2239
}
2240

2241
impl Shl<u16> for U64Vec2 {
2242
    type Output = Self;
2243
    #[inline]
2244
    fn shl(self, rhs: u16) -> Self::Output {
3✔
2245
        Self {
2246
            x: self.x.shl(rhs),
3✔
2247
            y: self.y.shl(rhs),
3✔
2248
        }
2249
    }
2250
}
2251

2252
impl Shl<&u16> for U64Vec2 {
2253
    type Output = Self;
2254
    #[inline]
2255
    fn shl(self, rhs: &u16) -> Self {
3✔
2256
        self.shl(*rhs)
3✔
2257
    }
2258
}
2259

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

2268
impl Shl<u16> for &U64Vec2 {
2269
    type Output = U64Vec2;
2270
    #[inline]
2271
    fn shl(self, rhs: u16) -> U64Vec2 {
3✔
2272
        (*self).shl(rhs)
3✔
2273
    }
2274
}
2275

2276
impl ShlAssign<u16> for U64Vec2 {
2277
    #[inline]
2278
    fn shl_assign(&mut self, rhs: u16) {
3✔
2279
        *self = self.shl(rhs);
3✔
2280
    }
2281
}
2282

2283
impl ShlAssign<&u16> for U64Vec2 {
2284
    #[inline]
2285
    fn shl_assign(&mut self, rhs: &u16) {
3✔
2286
        self.shl_assign(*rhs);
3✔
2287
    }
2288
}
2289

2290
impl Shr<u16> for U64Vec2 {
2291
    type Output = Self;
2292
    #[inline]
2293
    fn shr(self, rhs: u16) -> Self::Output {
3✔
2294
        Self {
2295
            x: self.x.shr(rhs),
3✔
2296
            y: self.y.shr(rhs),
3✔
2297
        }
2298
    }
2299
}
2300

2301
impl Shr<&u16> for U64Vec2 {
2302
    type Output = Self;
2303
    #[inline]
2304
    fn shr(self, rhs: &u16) -> Self {
3✔
2305
        self.shr(*rhs)
3✔
2306
    }
2307
}
2308

2309
impl Shr<&u16> for &U64Vec2 {
2310
    type Output = U64Vec2;
2311
    #[inline]
2312
    fn shr(self, rhs: &u16) -> U64Vec2 {
3✔
2313
        (*self).shr(*rhs)
3✔
2314
    }
2315
}
2316

2317
impl Shr<u16> for &U64Vec2 {
2318
    type Output = U64Vec2;
2319
    #[inline]
2320
    fn shr(self, rhs: u16) -> U64Vec2 {
3✔
2321
        (*self).shr(rhs)
3✔
2322
    }
2323
}
2324

2325
impl ShrAssign<u16> for U64Vec2 {
2326
    #[inline]
2327
    fn shr_assign(&mut self, rhs: u16) {
3✔
2328
        *self = self.shr(rhs);
3✔
2329
    }
2330
}
2331

2332
impl ShrAssign<&u16> for U64Vec2 {
2333
    #[inline]
2334
    fn shr_assign(&mut self, rhs: &u16) {
3✔
2335
        self.shr_assign(*rhs);
3✔
2336
    }
2337
}
2338

2339
impl Shl<u32> for U64Vec2 {
2340
    type Output = Self;
2341
    #[inline]
2342
    fn shl(self, rhs: u32) -> Self::Output {
3✔
2343
        Self {
2344
            x: self.x.shl(rhs),
3✔
2345
            y: self.y.shl(rhs),
3✔
2346
        }
2347
    }
2348
}
2349

2350
impl Shl<&u32> for U64Vec2 {
2351
    type Output = Self;
2352
    #[inline]
2353
    fn shl(self, rhs: &u32) -> Self {
3✔
2354
        self.shl(*rhs)
3✔
2355
    }
2356
}
2357

2358
impl Shl<&u32> for &U64Vec2 {
2359
    type Output = U64Vec2;
2360
    #[inline]
2361
    fn shl(self, rhs: &u32) -> U64Vec2 {
3✔
2362
        (*self).shl(*rhs)
3✔
2363
    }
2364
}
2365

2366
impl Shl<u32> for &U64Vec2 {
2367
    type Output = U64Vec2;
2368
    #[inline]
2369
    fn shl(self, rhs: u32) -> U64Vec2 {
3✔
2370
        (*self).shl(rhs)
3✔
2371
    }
2372
}
2373

2374
impl ShlAssign<u32> for U64Vec2 {
2375
    #[inline]
2376
    fn shl_assign(&mut self, rhs: u32) {
3✔
2377
        *self = self.shl(rhs);
3✔
2378
    }
2379
}
2380

2381
impl ShlAssign<&u32> for U64Vec2 {
2382
    #[inline]
2383
    fn shl_assign(&mut self, rhs: &u32) {
3✔
2384
        self.shl_assign(*rhs);
3✔
2385
    }
2386
}
2387

2388
impl Shr<u32> for U64Vec2 {
2389
    type Output = Self;
2390
    #[inline]
2391
    fn shr(self, rhs: u32) -> Self::Output {
3✔
2392
        Self {
2393
            x: self.x.shr(rhs),
3✔
2394
            y: self.y.shr(rhs),
3✔
2395
        }
2396
    }
2397
}
2398

2399
impl Shr<&u32> for U64Vec2 {
2400
    type Output = Self;
2401
    #[inline]
2402
    fn shr(self, rhs: &u32) -> Self {
3✔
2403
        self.shr(*rhs)
3✔
2404
    }
2405
}
2406

2407
impl Shr<&u32> for &U64Vec2 {
2408
    type Output = U64Vec2;
2409
    #[inline]
2410
    fn shr(self, rhs: &u32) -> U64Vec2 {
3✔
2411
        (*self).shr(*rhs)
3✔
2412
    }
2413
}
2414

2415
impl Shr<u32> for &U64Vec2 {
2416
    type Output = U64Vec2;
2417
    #[inline]
2418
    fn shr(self, rhs: u32) -> U64Vec2 {
3✔
2419
        (*self).shr(rhs)
3✔
2420
    }
2421
}
2422

2423
impl ShrAssign<u32> for U64Vec2 {
2424
    #[inline]
2425
    fn shr_assign(&mut self, rhs: u32) {
3✔
2426
        *self = self.shr(rhs);
3✔
2427
    }
2428
}
2429

2430
impl ShrAssign<&u32> for U64Vec2 {
2431
    #[inline]
2432
    fn shr_assign(&mut self, rhs: &u32) {
3✔
2433
        self.shr_assign(*rhs);
3✔
2434
    }
2435
}
2436

2437
impl Shl<u64> for U64Vec2 {
2438
    type Output = Self;
2439
    #[inline]
2440
    fn shl(self, rhs: u64) -> Self::Output {
3✔
2441
        Self {
2442
            x: self.x.shl(rhs),
3✔
2443
            y: self.y.shl(rhs),
3✔
2444
        }
2445
    }
2446
}
2447

2448
impl Shl<&u64> for U64Vec2 {
2449
    type Output = Self;
2450
    #[inline]
2451
    fn shl(self, rhs: &u64) -> Self {
3✔
2452
        self.shl(*rhs)
3✔
2453
    }
2454
}
2455

2456
impl Shl<&u64> for &U64Vec2 {
2457
    type Output = U64Vec2;
2458
    #[inline]
2459
    fn shl(self, rhs: &u64) -> U64Vec2 {
3✔
2460
        (*self).shl(*rhs)
3✔
2461
    }
2462
}
2463

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

2472
impl ShlAssign<u64> for U64Vec2 {
2473
    #[inline]
2474
    fn shl_assign(&mut self, rhs: u64) {
3✔
2475
        *self = self.shl(rhs);
3✔
2476
    }
2477
}
2478

2479
impl ShlAssign<&u64> for U64Vec2 {
2480
    #[inline]
2481
    fn shl_assign(&mut self, rhs: &u64) {
3✔
2482
        self.shl_assign(*rhs);
3✔
2483
    }
2484
}
2485

2486
impl Shr<u64> for U64Vec2 {
2487
    type Output = Self;
2488
    #[inline]
2489
    fn shr(self, rhs: u64) -> Self::Output {
3✔
2490
        Self {
2491
            x: self.x.shr(rhs),
3✔
2492
            y: self.y.shr(rhs),
3✔
2493
        }
2494
    }
2495
}
2496

2497
impl Shr<&u64> for U64Vec2 {
2498
    type Output = Self;
2499
    #[inline]
2500
    fn shr(self, rhs: &u64) -> Self {
3✔
2501
        self.shr(*rhs)
3✔
2502
    }
2503
}
2504

2505
impl Shr<&u64> for &U64Vec2 {
2506
    type Output = U64Vec2;
2507
    #[inline]
2508
    fn shr(self, rhs: &u64) -> U64Vec2 {
3✔
2509
        (*self).shr(*rhs)
3✔
2510
    }
2511
}
2512

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

2521
impl ShrAssign<u64> for U64Vec2 {
2522
    #[inline]
2523
    fn shr_assign(&mut self, rhs: u64) {
3✔
2524
        *self = self.shr(rhs);
3✔
2525
    }
2526
}
2527

2528
impl ShrAssign<&u64> for U64Vec2 {
2529
    #[inline]
2530
    fn shr_assign(&mut self, rhs: &u64) {
3✔
2531
        self.shr_assign(*rhs);
3✔
2532
    }
2533
}
2534

2535
#[cfg(feature = "i32")]
2536

2537
impl Shl<IVec2> for U64Vec2 {
2538
    type Output = Self;
2539
    #[inline]
2540
    fn shl(self, rhs: IVec2) -> Self {
3✔
2541
        Self {
2542
            x: self.x.shl(rhs.x),
3✔
2543
            y: self.y.shl(rhs.y),
3✔
2544
        }
2545
    }
2546
}
2547

2548
#[cfg(feature = "i32")]
2549

2550
impl Shl<&IVec2> for U64Vec2 {
2551
    type Output = Self;
2552
    #[inline]
2553
    fn shl(self, rhs: &IVec2) -> Self {
3✔
2554
        self.shl(*rhs)
3✔
2555
    }
2556
}
2557

2558
#[cfg(feature = "i32")]
2559

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

2568
#[cfg(feature = "i32")]
2569

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

2578
#[cfg(feature = "i32")]
2579

2580
impl Shr<IVec2> for U64Vec2 {
2581
    type Output = Self;
2582
    #[inline]
2583
    fn shr(self, rhs: IVec2) -> Self {
3✔
2584
        Self {
2585
            x: self.x.shr(rhs.x),
3✔
2586
            y: self.y.shr(rhs.y),
3✔
2587
        }
2588
    }
2589
}
2590

2591
#[cfg(feature = "i32")]
2592

2593
impl Shr<&IVec2> for U64Vec2 {
2594
    type Output = Self;
2595
    #[inline]
2596
    fn shr(self, rhs: &IVec2) -> Self {
3✔
2597
        self.shr(*rhs)
3✔
2598
    }
2599
}
2600

2601
#[cfg(feature = "i32")]
2602

2603
impl Shr<&IVec2> for &U64Vec2 {
2604
    type Output = U64Vec2;
2605
    #[inline]
2606
    fn shr(self, rhs: &IVec2) -> U64Vec2 {
3✔
2607
        (*self).shr(*rhs)
3✔
2608
    }
2609
}
2610

2611
#[cfg(feature = "i32")]
2612

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

2621
#[cfg(feature = "u32")]
2622

2623
impl Shl<UVec2> for U64Vec2 {
2624
    type Output = Self;
2625
    #[inline]
2626
    fn shl(self, rhs: UVec2) -> Self {
3✔
2627
        Self {
2628
            x: self.x.shl(rhs.x),
3✔
2629
            y: self.y.shl(rhs.y),
3✔
2630
        }
2631
    }
2632
}
2633

2634
#[cfg(feature = "u32")]
2635

2636
impl Shl<&UVec2> for U64Vec2 {
2637
    type Output = Self;
2638
    #[inline]
2639
    fn shl(self, rhs: &UVec2) -> Self {
3✔
2640
        self.shl(*rhs)
3✔
2641
    }
2642
}
2643

2644
#[cfg(feature = "u32")]
2645

2646
impl Shl<&UVec2> for &U64Vec2 {
2647
    type Output = U64Vec2;
2648
    #[inline]
2649
    fn shl(self, rhs: &UVec2) -> U64Vec2 {
3✔
2650
        (*self).shl(*rhs)
3✔
2651
    }
2652
}
2653

2654
#[cfg(feature = "u32")]
2655

2656
impl Shl<UVec2> for &U64Vec2 {
2657
    type Output = U64Vec2;
2658
    #[inline]
2659
    fn shl(self, rhs: UVec2) -> U64Vec2 {
3✔
2660
        (*self).shl(rhs)
3✔
2661
    }
2662
}
2663

2664
#[cfg(feature = "u32")]
2665

2666
impl Shr<UVec2> for U64Vec2 {
2667
    type Output = Self;
2668
    #[inline]
2669
    fn shr(self, rhs: UVec2) -> Self {
3✔
2670
        Self {
2671
            x: self.x.shr(rhs.x),
3✔
2672
            y: self.y.shr(rhs.y),
3✔
2673
        }
2674
    }
2675
}
2676

2677
#[cfg(feature = "u32")]
2678

2679
impl Shr<&UVec2> for U64Vec2 {
2680
    type Output = Self;
2681
    #[inline]
2682
    fn shr(self, rhs: &UVec2) -> Self {
3✔
2683
        self.shr(*rhs)
3✔
2684
    }
2685
}
2686

2687
#[cfg(feature = "u32")]
2688

2689
impl Shr<&UVec2> for &U64Vec2 {
2690
    type Output = U64Vec2;
2691
    #[inline]
2692
    fn shr(self, rhs: &UVec2) -> U64Vec2 {
3✔
2693
        (*self).shr(*rhs)
3✔
2694
    }
2695
}
2696

2697
#[cfg(feature = "u32")]
2698

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

2707
impl Index<usize> for U64Vec2 {
2708
    type Output = u64;
2709
    #[inline]
2710
    fn index(&self, index: usize) -> &Self::Output {
3✔
2711
        match index {
6✔
2712
            0 => &self.x,
3✔
2713
            1 => &self.y,
3✔
2714
            _ => panic!("index out of bounds"),
×
2715
        }
2716
    }
2717
}
2718

2719
impl IndexMut<usize> for U64Vec2 {
2720
    #[inline]
2721
    fn index_mut(&mut self, index: usize) -> &mut Self::Output {
3✔
2722
        match index {
6✔
2723
            0 => &mut self.x,
3✔
2724
            1 => &mut self.y,
3✔
2725
            _ => panic!("index out of bounds"),
×
2726
        }
2727
    }
2728
}
2729

2730
impl fmt::Display for U64Vec2 {
2731
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3✔
2732
        write!(f, "[{}, {}]", self.x, self.y)
3✔
2733
    }
2734
}
2735

2736
impl fmt::Debug for U64Vec2 {
2737
    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
3✔
2738
        fmt.debug_tuple(stringify!(U64Vec2))
3✔
2739
            .field(&self.x)
3✔
2740
            .field(&self.y)
3✔
2741
            .finish()
2742
    }
2743
}
2744

2745
impl From<[u64; 2]> for U64Vec2 {
2746
    #[inline]
2747
    fn from(a: [u64; 2]) -> Self {
×
2748
        Self::new(a[0], a[1])
6✔
2749
    }
2750
}
2751

2752
impl From<U64Vec2> for [u64; 2] {
2753
    #[inline]
2754
    fn from(v: U64Vec2) -> Self {
3✔
2755
        [v.x, v.y]
3✔
2756
    }
2757
}
2758

2759
impl From<(u64, u64)> for U64Vec2 {
2760
    #[inline]
2761
    fn from(t: (u64, u64)) -> Self {
3✔
2762
        Self::new(t.0, t.1)
×
2763
    }
2764
}
2765

2766
impl From<U64Vec2> for (u64, u64) {
2767
    #[inline]
2768
    fn from(v: U64Vec2) -> Self {
6✔
2769
        (v.x, v.y)
×
2770
    }
2771
}
2772

2773
impl From<U8Vec2> for U64Vec2 {
2774
    #[inline]
2775
    fn from(v: U8Vec2) -> Self {
3✔
2776
        Self::new(u64::from(v.x), u64::from(v.y))
3✔
2777
    }
2778
}
2779

2780
impl From<U16Vec2> for U64Vec2 {
2781
    #[inline]
2782
    fn from(v: U16Vec2) -> Self {
3✔
2783
        Self::new(u64::from(v.x), u64::from(v.y))
3✔
2784
    }
2785
}
2786

2787
impl From<UVec2> for U64Vec2 {
2788
    #[inline]
2789
    fn from(v: UVec2) -> Self {
3✔
2790
        Self::new(u64::from(v.x), u64::from(v.y))
3✔
2791
    }
2792
}
2793

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

2796
impl TryFrom<I8Vec2> for U64Vec2 {
2797
    type Error = core::num::TryFromIntError;
2798

2799
    #[inline]
2800
    fn try_from(v: I8Vec2) -> Result<Self, Self::Error> {
3✔
2801
        Ok(Self::new(u64::try_from(v.x)?, u64::try_from(v.y)?))
3✔
2802
    }
2803
}
2804

2805
#[cfg(feature = "i16")]
2806

2807
impl TryFrom<I16Vec2> for U64Vec2 {
2808
    type Error = core::num::TryFromIntError;
2809

2810
    #[inline]
2811
    fn try_from(v: I16Vec2) -> Result<Self, Self::Error> {
3✔
2812
        Ok(Self::new(u64::try_from(v.x)?, u64::try_from(v.y)?))
3✔
2813
    }
2814
}
2815

2816
#[cfg(feature = "i32")]
2817

2818
impl TryFrom<IVec2> for U64Vec2 {
2819
    type Error = core::num::TryFromIntError;
2820

2821
    #[inline]
2822
    fn try_from(v: IVec2) -> Result<Self, Self::Error> {
3✔
2823
        Ok(Self::new(u64::try_from(v.x)?, u64::try_from(v.y)?))
3✔
2824
    }
2825
}
2826

2827
#[cfg(feature = "i64")]
2828

2829
impl TryFrom<I64Vec2> for U64Vec2 {
2830
    type Error = core::num::TryFromIntError;
2831

2832
    #[inline]
2833
    fn try_from(v: I64Vec2) -> Result<Self, Self::Error> {
3✔
2834
        Ok(Self::new(u64::try_from(v.x)?, u64::try_from(v.y)?))
3✔
2835
    }
2836
}
2837

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

2840
impl TryFrom<ISizeVec2> for U64Vec2 {
2841
    type Error = core::num::TryFromIntError;
2842

2843
    #[inline]
2844
    fn try_from(v: ISizeVec2) -> Result<Self, Self::Error> {
3✔
2845
        Ok(Self::new(u64::try_from(v.x)?, u64::try_from(v.y)?))
3✔
2846
    }
2847
}
2848

2849
#[cfg(feature = "usize")]
2850

2851
impl TryFrom<USizeVec2> for U64Vec2 {
2852
    type Error = core::num::TryFromIntError;
2853

2854
    #[inline]
2855
    fn try_from(v: USizeVec2) -> Result<Self, Self::Error> {
3✔
2856
        Ok(Self::new(u64::try_from(v.x)?, u64::try_from(v.y)?))
3✔
2857
    }
2858
}
2859

2860
impl From<BVec2> for U64Vec2 {
2861
    #[inline]
2862
    fn from(v: BVec2) -> Self {
3✔
2863
        Self::new(u64::from(v.x), u64::from(v.y))
3✔
2864
    }
2865
}
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