glam/i64/
i64vec3.rs

1// Generated from vec.rs.tera template. Edit the template, not the generated file.
2
3use crate::{
4    BVec3, BVec3A, I16Vec3, I64Vec2, I64Vec4, I8Vec3, IVec3, U16Vec3, U64Vec3, U8Vec3, USizeVec3,
5    UVec3,
6};
7
8use core::fmt;
9use core::iter::{Product, Sum};
10use core::{f32, ops::*};
11
12/// Creates a 3-dimensional vector.
13#[inline(always)]
14#[must_use]
15pub const fn i64vec3(x: i64, y: i64, z: i64) -> I64Vec3 {
16    I64Vec3::new(x, y, z)
17}
18
19/// A 3-dimensional vector.
20#[derive(Clone, Copy, PartialEq, Eq, Hash)]
21#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
22#[repr(C)]
23#[cfg_attr(target_arch = "spirv", rust_gpu::vector::v1)]
24pub struct I64Vec3 {
25    pub x: i64,
26    pub y: i64,
27    pub z: i64,
28}
29
30impl I64Vec3 {
31    /// All zeroes.
32    pub const ZERO: Self = Self::splat(0);
33
34    /// All ones.
35    pub const ONE: Self = Self::splat(1);
36
37    /// All negative ones.
38    pub const NEG_ONE: Self = Self::splat(-1);
39
40    /// All `i64::MIN`.
41    pub const MIN: Self = Self::splat(i64::MIN);
42
43    /// All `i64::MAX`.
44    pub const MAX: Self = Self::splat(i64::MAX);
45
46    /// A unit vector pointing along the positive X axis.
47    pub const X: Self = Self::new(1, 0, 0);
48
49    /// A unit vector pointing along the positive Y axis.
50    pub const Y: Self = Self::new(0, 1, 0);
51
52    /// A unit vector pointing along the positive Z axis.
53    pub const Z: Self = Self::new(0, 0, 1);
54
55    /// A unit vector pointing along the negative X axis.
56    pub const NEG_X: Self = Self::new(-1, 0, 0);
57
58    /// A unit vector pointing along the negative Y axis.
59    pub const NEG_Y: Self = Self::new(0, -1, 0);
60
61    /// A unit vector pointing along the negative Z axis.
62    pub const NEG_Z: Self = Self::new(0, 0, -1);
63
64    /// The unit axes.
65    pub const AXES: [Self; 3] = [Self::X, Self::Y, Self::Z];
66
67    /// Creates a new vector.
68    #[inline(always)]
69    #[must_use]
70    pub const fn new(x: i64, y: i64, z: i64) -> Self {
71        Self { x, y, z }
72    }
73
74    /// Creates a vector with all elements set to `v`.
75    #[inline]
76    #[must_use]
77    pub const fn splat(v: i64) -> Self {
78        Self { x: v, y: v, z: v }
79    }
80
81    /// Returns a vector containing each element of `self` modified by a mapping function `f`.
82    #[inline]
83    #[must_use]
84    pub fn map<F>(self, f: F) -> Self
85    where
86        F: Fn(i64) -> i64,
87    {
88        Self::new(f(self.x), f(self.y), f(self.z))
89    }
90
91    /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
92    /// for each element of `self`.
93    ///
94    /// A true element in the mask uses the corresponding element from `if_true`, and false
95    /// uses the element from `if_false`.
96    #[inline]
97    #[must_use]
98    pub fn select(mask: BVec3, if_true: Self, if_false: Self) -> Self {
99        Self {
100            x: if mask.test(0) { if_true.x } else { if_false.x },
101            y: if mask.test(1) { if_true.y } else { if_false.y },
102            z: if mask.test(2) { if_true.z } else { if_false.z },
103        }
104    }
105
106    /// Creates a new vector from an array.
107    #[inline]
108    #[must_use]
109    pub const fn from_array(a: [i64; 3]) -> Self {
110        Self::new(a[0], a[1], a[2])
111    }
112
113    /// Converts `self` to `[x, y, z]`
114    #[inline]
115    #[must_use]
116    pub const fn to_array(&self) -> [i64; 3] {
117        [self.x, self.y, self.z]
118    }
119
120    /// Creates a vector from the first 3 values in `slice`.
121    ///
122    /// # Panics
123    ///
124    /// Panics if `slice` is less than 3 elements long.
125    #[inline]
126    #[must_use]
127    pub const fn from_slice(slice: &[i64]) -> Self {
128        assert!(slice.len() >= 3);
129        Self::new(slice[0], slice[1], slice[2])
130    }
131
132    /// Writes the elements of `self` to the first 3 elements in `slice`.
133    ///
134    /// # Panics
135    ///
136    /// Panics if `slice` is less than 3 elements long.
137    #[inline]
138    pub fn write_to_slice(self, slice: &mut [i64]) {
139        slice[..3].copy_from_slice(&self.to_array());
140    }
141
142    /// Internal method for creating a 3D vector from a 4D vector, discarding `w`.
143    #[allow(dead_code)]
144    #[inline]
145    #[must_use]
146    pub(crate) fn from_vec4(v: I64Vec4) -> Self {
147        Self {
148            x: v.x,
149            y: v.y,
150            z: v.z,
151        }
152    }
153
154    /// Creates a 4D vector from `self` and the given `w` value.
155    #[inline]
156    #[must_use]
157    pub fn extend(self, w: i64) -> I64Vec4 {
158        I64Vec4::new(self.x, self.y, self.z, w)
159    }
160
161    /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.
162    ///
163    /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].
164    #[inline]
165    #[must_use]
166    pub fn truncate(self) -> I64Vec2 {
167        use crate::swizzles::Vec3Swizzles;
168        self.xy()
169    }
170
171    /// Creates a 3D vector from `self` with the given value of `x`.
172    #[inline]
173    #[must_use]
174    pub fn with_x(mut self, x: i64) -> Self {
175        self.x = x;
176        self
177    }
178
179    /// Creates a 3D vector from `self` with the given value of `y`.
180    #[inline]
181    #[must_use]
182    pub fn with_y(mut self, y: i64) -> Self {
183        self.y = y;
184        self
185    }
186
187    /// Creates a 3D vector from `self` with the given value of `z`.
188    #[inline]
189    #[must_use]
190    pub fn with_z(mut self, z: i64) -> Self {
191        self.z = z;
192        self
193    }
194
195    /// Computes the dot product of `self` and `rhs`.
196    #[inline]
197    #[must_use]
198    pub fn dot(self, rhs: Self) -> i64 {
199        (self.x * rhs.x) + (self.y * rhs.y) + (self.z * rhs.z)
200    }
201
202    /// Returns a vector where every component is the dot product of `self` and `rhs`.
203    #[inline]
204    #[must_use]
205    pub fn dot_into_vec(self, rhs: Self) -> Self {
206        Self::splat(self.dot(rhs))
207    }
208
209    /// Computes the cross product of `self` and `rhs`.
210    #[inline]
211    #[must_use]
212    pub fn cross(self, rhs: Self) -> Self {
213        Self {
214            x: self.y * rhs.z - rhs.y * self.z,
215            y: self.z * rhs.x - rhs.z * self.x,
216            z: self.x * rhs.y - rhs.x * self.y,
217        }
218    }
219
220    /// Returns a vector containing the minimum values for each element of `self` and `rhs`.
221    ///
222    /// In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.
223    #[inline]
224    #[must_use]
225    pub fn min(self, rhs: Self) -> Self {
226        Self {
227            x: if self.x < rhs.x { self.x } else { rhs.x },
228            y: if self.y < rhs.y { self.y } else { rhs.y },
229            z: if self.z < rhs.z { self.z } else { rhs.z },
230        }
231    }
232
233    /// Returns a vector containing the maximum values for each element of `self` and `rhs`.
234    ///
235    /// In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.
236    #[inline]
237    #[must_use]
238    pub fn max(self, rhs: Self) -> Self {
239        Self {
240            x: if self.x > rhs.x { self.x } else { rhs.x },
241            y: if self.y > rhs.y { self.y } else { rhs.y },
242            z: if self.z > rhs.z { self.z } else { rhs.z },
243        }
244    }
245
246    /// Component-wise clamping of values, similar to [`i64::clamp`].
247    ///
248    /// Each element in `min` must be less-or-equal to the corresponding element in `max`.
249    ///
250    /// # Panics
251    ///
252    /// Will panic if `min` is greater than `max` when `glam_assert` is enabled.
253    #[inline]
254    #[must_use]
255    pub fn clamp(self, min: Self, max: Self) -> Self {
256        glam_assert!(min.cmple(max).all(), "clamp: expected min <= max");
257        self.max(min).min(max)
258    }
259
260    /// Returns the horizontal minimum of `self`.
261    ///
262    /// In other words this computes `min(x, y, ..)`.
263    #[inline]
264    #[must_use]
265    pub fn min_element(self) -> i64 {
266        let min = |a, b| if a < b { a } else { b };
267        min(self.x, min(self.y, self.z))
268    }
269
270    /// Returns the horizontal maximum of `self`.
271    ///
272    /// In other words this computes `max(x, y, ..)`.
273    #[inline]
274    #[must_use]
275    pub fn max_element(self) -> i64 {
276        let max = |a, b| if a > b { a } else { b };
277        max(self.x, max(self.y, self.z))
278    }
279
280    /// Returns the index of the first minimum element of `self`.
281    #[doc(alias = "argmin")]
282    #[inline]
283    #[must_use]
284    pub fn min_position(self) -> usize {
285        let mut min = self.x;
286        let mut index = 0;
287        if self.y < min {
288            min = self.y;
289            index = 1;
290        }
291        if self.z < min {
292            index = 2;
293        }
294        index
295    }
296
297    /// Returns the index of the first maximum element of `self`.
298    #[doc(alias = "argmax")]
299    #[inline]
300    #[must_use]
301    pub fn max_position(self) -> usize {
302        let mut max = self.x;
303        let mut index = 0;
304        if self.y > max {
305            max = self.y;
306            index = 1;
307        }
308        if self.z > max {
309            index = 2;
310        }
311        index
312    }
313
314    /// Returns the sum of all elements of `self`.
315    ///
316    /// In other words, this computes `self.x + self.y + ..`.
317    #[inline]
318    #[must_use]
319    pub fn element_sum(self) -> i64 {
320        self.x + self.y + self.z
321    }
322
323    /// Returns the product of all elements of `self`.
324    ///
325    /// In other words, this computes `self.x * self.y * ..`.
326    #[inline]
327    #[must_use]
328    pub fn element_product(self) -> i64 {
329        self.x * self.y * self.z
330    }
331
332    /// Returns a vector mask containing the result of a `==` comparison for each element of
333    /// `self` and `rhs`.
334    ///
335    /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all
336    /// elements.
337    #[inline]
338    #[must_use]
339    pub fn cmpeq(self, rhs: Self) -> BVec3 {
340        BVec3::new(self.x.eq(&rhs.x), self.y.eq(&rhs.y), self.z.eq(&rhs.z))
341    }
342
343    /// Returns a vector mask containing the result of a `!=` comparison for each element of
344    /// `self` and `rhs`.
345    ///
346    /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all
347    /// elements.
348    #[inline]
349    #[must_use]
350    pub fn cmpne(self, rhs: Self) -> BVec3 {
351        BVec3::new(self.x.ne(&rhs.x), self.y.ne(&rhs.y), self.z.ne(&rhs.z))
352    }
353
354    /// Returns a vector mask containing the result of a `>=` comparison for each element of
355    /// `self` and `rhs`.
356    ///
357    /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all
358    /// elements.
359    #[inline]
360    #[must_use]
361    pub fn cmpge(self, rhs: Self) -> BVec3 {
362        BVec3::new(self.x.ge(&rhs.x), self.y.ge(&rhs.y), self.z.ge(&rhs.z))
363    }
364
365    /// Returns a vector mask containing the result of a `>` comparison for each element of
366    /// `self` and `rhs`.
367    ///
368    /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all
369    /// elements.
370    #[inline]
371    #[must_use]
372    pub fn cmpgt(self, rhs: Self) -> BVec3 {
373        BVec3::new(self.x.gt(&rhs.x), self.y.gt(&rhs.y), self.z.gt(&rhs.z))
374    }
375
376    /// Returns a vector mask containing the result of a `<=` comparison for each element of
377    /// `self` and `rhs`.
378    ///
379    /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all
380    /// elements.
381    #[inline]
382    #[must_use]
383    pub fn cmple(self, rhs: Self) -> BVec3 {
384        BVec3::new(self.x.le(&rhs.x), self.y.le(&rhs.y), self.z.le(&rhs.z))
385    }
386
387    /// Returns a vector mask containing the result of a `<` comparison for each element of
388    /// `self` and `rhs`.
389    ///
390    /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all
391    /// elements.
392    #[inline]
393    #[must_use]
394    pub fn cmplt(self, rhs: Self) -> BVec3 {
395        BVec3::new(self.x.lt(&rhs.x), self.y.lt(&rhs.y), self.z.lt(&rhs.z))
396    }
397
398    /// Returns a vector containing the absolute value of each element of `self`.
399    #[inline]
400    #[must_use]
401    pub fn abs(self) -> Self {
402        Self {
403            x: self.x.abs(),
404            y: self.y.abs(),
405            z: self.z.abs(),
406        }
407    }
408
409    /// Returns a vector with elements representing the sign of `self`.
410    ///
411    ///  - `0` if the number is zero
412    ///  - `1` if the number is positive
413    ///  - `-1` if the number is negative
414    #[inline]
415    #[must_use]
416    pub fn signum(self) -> Self {
417        Self {
418            x: self.x.signum(),
419            y: self.y.signum(),
420            z: self.z.signum(),
421        }
422    }
423
424    /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.
425    ///
426    /// A negative element results in a `1` bit and a positive element in a `0` bit.  Element `x` goes
427    /// into the first lowest bit, element `y` into the second, etc.
428    ///
429    /// An element is negative if it has a negative sign, including -0.0, NaNs with negative sign
430    /// bit and negative infinity.
431    #[inline]
432    #[must_use]
433    pub fn is_negative_bitmask(self) -> u32 {
434        (self.x.is_negative() as u32)
435            | ((self.y.is_negative() as u32) << 1)
436            | ((self.z.is_negative() as u32) << 2)
437    }
438
439    /// Computes the squared length of `self`.
440    #[doc(alias = "magnitude2")]
441    #[inline]
442    #[must_use]
443    pub fn length_squared(self) -> i64 {
444        self.dot(self)
445    }
446
447    /// Compute the squared euclidean distance between two points in space.
448    #[inline]
449    #[must_use]
450    pub fn distance_squared(self, rhs: Self) -> i64 {
451        (self - rhs).length_squared()
452    }
453
454    /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.
455    ///
456    /// # Panics
457    /// This function will panic if any `rhs` element is 0 or the division results in overflow.
458    #[inline]
459    #[must_use]
460    pub fn div_euclid(self, rhs: Self) -> Self {
461        Self::new(
462            self.x.div_euclid(rhs.x),
463            self.y.div_euclid(rhs.y),
464            self.z.div_euclid(rhs.z),
465        )
466    }
467
468    /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.
469    ///
470    /// # Panics
471    /// This function will panic if any `rhs` element is 0 or the division results in overflow.
472    ///
473    /// [Euclidean division]: i64::rem_euclid
474    #[inline]
475    #[must_use]
476    pub fn rem_euclid(self, rhs: Self) -> Self {
477        Self::new(
478            self.x.rem_euclid(rhs.x),
479            self.y.rem_euclid(rhs.y),
480            self.z.rem_euclid(rhs.z),
481        )
482    }
483
484    /// Computes the [manhattan distance] between two points.
485    ///
486    /// # Overflow
487    /// This method may overflow if the result is greater than [`u64::MAX`].
488    ///
489    /// See also [`checked_manhattan_distance`][I64Vec3::checked_manhattan_distance].
490    ///
491    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
492    #[inline]
493    #[must_use]
494    pub fn manhattan_distance(self, rhs: Self) -> u64 {
495        self.x.abs_diff(rhs.x) + self.y.abs_diff(rhs.y) + self.z.abs_diff(rhs.z)
496    }
497
498    /// Computes the [manhattan distance] between two points.
499    ///
500    /// This will returns [`None`] if the result is greater than [`u64::MAX`].
501    ///
502    /// [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry
503    #[inline]
504    #[must_use]
505    pub fn checked_manhattan_distance(self, rhs: Self) -> Option<u64> {
506        let d = self.x.abs_diff(rhs.x);
507        let d = d.checked_add(self.y.abs_diff(rhs.y))?;
508        d.checked_add(self.z.abs_diff(rhs.z))
509    }
510
511    /// Computes the [chebyshev distance] between two points.
512    ///
513    /// [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
514    #[inline]
515    #[must_use]
516    pub fn chebyshev_distance(self, rhs: Self) -> u64 {
517        // Note: the compiler will eventually optimize out the loop
518        [
519            self.x.abs_diff(rhs.x),
520            self.y.abs_diff(rhs.y),
521            self.z.abs_diff(rhs.z),
522        ]
523        .into_iter()
524        .max()
525        .unwrap()
526    }
527
528    /// Casts all elements of `self` to `f32`.
529    #[inline]
530    #[must_use]
531    pub fn as_vec3(&self) -> crate::Vec3 {
532        crate::Vec3::new(self.x as f32, self.y as f32, self.z as f32)
533    }
534
535    /// Casts all elements of `self` to `f32`.
536    #[inline]
537    #[must_use]
538    pub fn as_vec3a(&self) -> crate::Vec3A {
539        crate::Vec3A::new(self.x as f32, self.y as f32, self.z as f32)
540    }
541
542    /// Casts all elements of `self` to `f64`.
543    #[inline]
544    #[must_use]
545    pub fn as_dvec3(&self) -> crate::DVec3 {
546        crate::DVec3::new(self.x as f64, self.y as f64, self.z as f64)
547    }
548
549    /// Casts all elements of `self` to `i8`.
550    #[inline]
551    #[must_use]
552    pub fn as_i8vec3(&self) -> crate::I8Vec3 {
553        crate::I8Vec3::new(self.x as i8, self.y as i8, self.z as i8)
554    }
555
556    /// Casts all elements of `self` to `u8`.
557    #[inline]
558    #[must_use]
559    pub fn as_u8vec3(&self) -> crate::U8Vec3 {
560        crate::U8Vec3::new(self.x as u8, self.y as u8, self.z as u8)
561    }
562
563    /// Casts all elements of `self` to `i16`.
564    #[inline]
565    #[must_use]
566    pub fn as_i16vec3(&self) -> crate::I16Vec3 {
567        crate::I16Vec3::new(self.x as i16, self.y as i16, self.z as i16)
568    }
569
570    /// Casts all elements of `self` to `u16`.
571    #[inline]
572    #[must_use]
573    pub fn as_u16vec3(&self) -> crate::U16Vec3 {
574        crate::U16Vec3::new(self.x as u16, self.y as u16, self.z as u16)
575    }
576
577    /// Casts all elements of `self` to `i32`.
578    #[inline]
579    #[must_use]
580    pub fn as_ivec3(&self) -> crate::IVec3 {
581        crate::IVec3::new(self.x as i32, self.y as i32, self.z as i32)
582    }
583
584    /// Casts all elements of `self` to `u32`.
585    #[inline]
586    #[must_use]
587    pub fn as_uvec3(&self) -> crate::UVec3 {
588        crate::UVec3::new(self.x as u32, self.y as u32, self.z as u32)
589    }
590
591    /// Casts all elements of `self` to `u64`.
592    #[inline]
593    #[must_use]
594    pub fn as_u64vec3(&self) -> crate::U64Vec3 {
595        crate::U64Vec3::new(self.x as u64, self.y as u64, self.z as u64)
596    }
597
598    /// Casts all elements of `self` to `usize`.
599    #[inline]
600    #[must_use]
601    pub fn as_usizevec3(&self) -> crate::USizeVec3 {
602        crate::USizeVec3::new(self.x as usize, self.y as usize, self.z as usize)
603    }
604
605    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
606    ///
607    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
608    #[inline]
609    #[must_use]
610    pub const fn checked_add(self, rhs: Self) -> Option<Self> {
611        let x = match self.x.checked_add(rhs.x) {
612            Some(v) => v,
613            None => return None,
614        };
615        let y = match self.y.checked_add(rhs.y) {
616            Some(v) => v,
617            None => return None,
618        };
619        let z = match self.z.checked_add(rhs.z) {
620            Some(v) => v,
621            None => return None,
622        };
623
624        Some(Self { x, y, z })
625    }
626
627    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
628    ///
629    /// In other words this computes `Some([self.x - rhs.x, self.y - rhs.y, ..])` but returns `None` on any overflow.
630    #[inline]
631    #[must_use]
632    pub const fn checked_sub(self, rhs: Self) -> Option<Self> {
633        let x = match self.x.checked_sub(rhs.x) {
634            Some(v) => v,
635            None => return None,
636        };
637        let y = match self.y.checked_sub(rhs.y) {
638            Some(v) => v,
639            None => return None,
640        };
641        let z = match self.z.checked_sub(rhs.z) {
642            Some(v) => v,
643            None => return None,
644        };
645
646        Some(Self { x, y, z })
647    }
648
649    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
650    ///
651    /// In other words this computes `Some([self.x * rhs.x, self.y * rhs.y, ..])` but returns `None` on any overflow.
652    #[inline]
653    #[must_use]
654    pub const fn checked_mul(self, rhs: Self) -> Option<Self> {
655        let x = match self.x.checked_mul(rhs.x) {
656            Some(v) => v,
657            None => return None,
658        };
659        let y = match self.y.checked_mul(rhs.y) {
660            Some(v) => v,
661            None => return None,
662        };
663        let z = match self.z.checked_mul(rhs.z) {
664            Some(v) => v,
665            None => return None,
666        };
667
668        Some(Self { x, y, z })
669    }
670
671    /// Returns a vector containing the wrapping division of `self` and `rhs`.
672    ///
673    /// In other words this computes `Some([self.x / rhs.x, self.y / rhs.y, ..])` but returns `None` on any division by zero.
674    #[inline]
675    #[must_use]
676    pub const fn checked_div(self, rhs: Self) -> Option<Self> {
677        let x = match self.x.checked_div(rhs.x) {
678            Some(v) => v,
679            None => return None,
680        };
681        let y = match self.y.checked_div(rhs.y) {
682            Some(v) => v,
683            None => return None,
684        };
685        let z = match self.z.checked_div(rhs.z) {
686            Some(v) => v,
687            None => return None,
688        };
689
690        Some(Self { x, y, z })
691    }
692
693    /// Returns a vector containing the wrapping addition of `self` and `rhs`.
694    ///
695    /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.
696    #[inline]
697    #[must_use]
698    pub const fn wrapping_add(self, rhs: Self) -> Self {
699        Self {
700            x: self.x.wrapping_add(rhs.x),
701            y: self.y.wrapping_add(rhs.y),
702            z: self.z.wrapping_add(rhs.z),
703        }
704    }
705
706    /// Returns a vector containing the wrapping subtraction of `self` and `rhs`.
707    ///
708    /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.
709    #[inline]
710    #[must_use]
711    pub const fn wrapping_sub(self, rhs: Self) -> Self {
712        Self {
713            x: self.x.wrapping_sub(rhs.x),
714            y: self.y.wrapping_sub(rhs.y),
715            z: self.z.wrapping_sub(rhs.z),
716        }
717    }
718
719    /// Returns a vector containing the wrapping multiplication of `self` and `rhs`.
720    ///
721    /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.
722    #[inline]
723    #[must_use]
724    pub const fn wrapping_mul(self, rhs: Self) -> Self {
725        Self {
726            x: self.x.wrapping_mul(rhs.x),
727            y: self.y.wrapping_mul(rhs.y),
728            z: self.z.wrapping_mul(rhs.z),
729        }
730    }
731
732    /// Returns a vector containing the wrapping division of `self` and `rhs`.
733    ///
734    /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.
735    #[inline]
736    #[must_use]
737    pub const fn wrapping_div(self, rhs: Self) -> Self {
738        Self {
739            x: self.x.wrapping_div(rhs.x),
740            y: self.y.wrapping_div(rhs.y),
741            z: self.z.wrapping_div(rhs.z),
742        }
743    }
744
745    /// Returns a vector containing the saturating addition of `self` and `rhs`.
746    ///
747    /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.
748    #[inline]
749    #[must_use]
750    pub const fn saturating_add(self, rhs: Self) -> Self {
751        Self {
752            x: self.x.saturating_add(rhs.x),
753            y: self.y.saturating_add(rhs.y),
754            z: self.z.saturating_add(rhs.z),
755        }
756    }
757
758    /// Returns a vector containing the saturating subtraction of `self` and `rhs`.
759    ///
760    /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.
761    #[inline]
762    #[must_use]
763    pub const fn saturating_sub(self, rhs: Self) -> Self {
764        Self {
765            x: self.x.saturating_sub(rhs.x),
766            y: self.y.saturating_sub(rhs.y),
767            z: self.z.saturating_sub(rhs.z),
768        }
769    }
770
771    /// Returns a vector containing the saturating multiplication of `self` and `rhs`.
772    ///
773    /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.
774    #[inline]
775    #[must_use]
776    pub const fn saturating_mul(self, rhs: Self) -> Self {
777        Self {
778            x: self.x.saturating_mul(rhs.x),
779            y: self.y.saturating_mul(rhs.y),
780            z: self.z.saturating_mul(rhs.z),
781        }
782    }
783
784    /// Returns a vector containing the saturating division of `self` and `rhs`.
785    ///
786    /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.
787    #[inline]
788    #[must_use]
789    pub const fn saturating_div(self, rhs: Self) -> Self {
790        Self {
791            x: self.x.saturating_div(rhs.x),
792            y: self.y.saturating_div(rhs.y),
793            z: self.z.saturating_div(rhs.z),
794        }
795    }
796
797    /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.
798    ///
799    /// In other words this computes `Some([self.x + rhs.x, self.y + rhs.y, ..])` but returns `None` on any overflow.
800    #[inline]
801    #[must_use]
802    pub const fn checked_add_unsigned(self, rhs: U64Vec3) -> Option<Self> {
803        let x = match self.x.checked_add_unsigned(rhs.x) {
804            Some(v) => v,
805            None => return None,
806        };
807        let y = match self.y.checked_add_unsigned(rhs.y) {
808            Some(v) => v,
809            None => return None,
810        };
811        let z = match self.z.checked_add_unsigned(rhs.z) {
812            Some(v) => v,
813            None => return None,
814        };
815
816        Some(Self { x, y, z })
817    }
818
819    /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.
820    ///
821    /// In other words this computes `Some([self.x - rhs.x, self.y - rhs.y, ..])` but returns `None` on any overflow.
822    #[inline]
823    #[must_use]
824    pub const fn checked_sub_unsigned(self, rhs: U64Vec3) -> Option<Self> {
825        let x = match self.x.checked_sub_unsigned(rhs.x) {
826            Some(v) => v,
827            None => return None,
828        };
829        let y = match self.y.checked_sub_unsigned(rhs.y) {
830            Some(v) => v,
831            None => return None,
832        };
833        let z = match self.z.checked_sub_unsigned(rhs.z) {
834            Some(v) => v,
835            None => return None,
836        };
837
838        Some(Self { x, y, z })
839    }
840
841    /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.
842    ///
843    /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.
844    #[inline]
845    #[must_use]
846    pub const fn wrapping_add_unsigned(self, rhs: U64Vec3) -> Self {
847        Self {
848            x: self.x.wrapping_add_unsigned(rhs.x),
849            y: self.y.wrapping_add_unsigned(rhs.y),
850            z: self.z.wrapping_add_unsigned(rhs.z),
851        }
852    }
853
854    /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.
855    ///
856    /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.
857    #[inline]
858    #[must_use]
859    pub const fn wrapping_sub_unsigned(self, rhs: U64Vec3) -> Self {
860        Self {
861            x: self.x.wrapping_sub_unsigned(rhs.x),
862            y: self.y.wrapping_sub_unsigned(rhs.y),
863            z: self.z.wrapping_sub_unsigned(rhs.z),
864        }
865    }
866
867    // Returns a vector containing the saturating addition of `self` and unsigned vector `rhs`.
868    ///
869    /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.
870    #[inline]
871    #[must_use]
872    pub const fn saturating_add_unsigned(self, rhs: U64Vec3) -> Self {
873        Self {
874            x: self.x.saturating_add_unsigned(rhs.x),
875            y: self.y.saturating_add_unsigned(rhs.y),
876            z: self.z.saturating_add_unsigned(rhs.z),
877        }
878    }
879
880    /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.
881    ///
882    /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.
883    #[inline]
884    #[must_use]
885    pub const fn saturating_sub_unsigned(self, rhs: U64Vec3) -> Self {
886        Self {
887            x: self.x.saturating_sub_unsigned(rhs.x),
888            y: self.y.saturating_sub_unsigned(rhs.y),
889            z: self.z.saturating_sub_unsigned(rhs.z),
890        }
891    }
892}
893
894impl Default for I64Vec3 {
895    #[inline(always)]
896    fn default() -> Self {
897        Self::ZERO
898    }
899}
900
901impl Div for I64Vec3 {
902    type Output = Self;
903    #[inline]
904    fn div(self, rhs: Self) -> Self {
905        Self {
906            x: self.x.div(rhs.x),
907            y: self.y.div(rhs.y),
908            z: self.z.div(rhs.z),
909        }
910    }
911}
912
913impl Div<&Self> for I64Vec3 {
914    type Output = Self;
915    #[inline]
916    fn div(self, rhs: &Self) -> Self {
917        self.div(*rhs)
918    }
919}
920
921impl Div<&I64Vec3> for &I64Vec3 {
922    type Output = I64Vec3;
923    #[inline]
924    fn div(self, rhs: &I64Vec3) -> I64Vec3 {
925        (*self).div(*rhs)
926    }
927}
928
929impl Div<I64Vec3> for &I64Vec3 {
930    type Output = I64Vec3;
931    #[inline]
932    fn div(self, rhs: I64Vec3) -> I64Vec3 {
933        (*self).div(rhs)
934    }
935}
936
937impl DivAssign for I64Vec3 {
938    #[inline]
939    fn div_assign(&mut self, rhs: Self) {
940        self.x.div_assign(rhs.x);
941        self.y.div_assign(rhs.y);
942        self.z.div_assign(rhs.z);
943    }
944}
945
946impl DivAssign<&Self> for I64Vec3 {
947    #[inline]
948    fn div_assign(&mut self, rhs: &Self) {
949        self.div_assign(*rhs);
950    }
951}
952
953impl Div<i64> for I64Vec3 {
954    type Output = Self;
955    #[inline]
956    fn div(self, rhs: i64) -> Self {
957        Self {
958            x: self.x.div(rhs),
959            y: self.y.div(rhs),
960            z: self.z.div(rhs),
961        }
962    }
963}
964
965impl Div<&i64> for I64Vec3 {
966    type Output = Self;
967    #[inline]
968    fn div(self, rhs: &i64) -> Self {
969        self.div(*rhs)
970    }
971}
972
973impl Div<&i64> for &I64Vec3 {
974    type Output = I64Vec3;
975    #[inline]
976    fn div(self, rhs: &i64) -> I64Vec3 {
977        (*self).div(*rhs)
978    }
979}
980
981impl Div<i64> for &I64Vec3 {
982    type Output = I64Vec3;
983    #[inline]
984    fn div(self, rhs: i64) -> I64Vec3 {
985        (*self).div(rhs)
986    }
987}
988
989impl DivAssign<i64> for I64Vec3 {
990    #[inline]
991    fn div_assign(&mut self, rhs: i64) {
992        self.x.div_assign(rhs);
993        self.y.div_assign(rhs);
994        self.z.div_assign(rhs);
995    }
996}
997
998impl DivAssign<&i64> for I64Vec3 {
999    #[inline]
1000    fn div_assign(&mut self, rhs: &i64) {
1001        self.div_assign(*rhs);
1002    }
1003}
1004
1005impl Div<I64Vec3> for i64 {
1006    type Output = I64Vec3;
1007    #[inline]
1008    fn div(self, rhs: I64Vec3) -> I64Vec3 {
1009        I64Vec3 {
1010            x: self.div(rhs.x),
1011            y: self.div(rhs.y),
1012            z: self.div(rhs.z),
1013        }
1014    }
1015}
1016
1017impl Div<&I64Vec3> for i64 {
1018    type Output = I64Vec3;
1019    #[inline]
1020    fn div(self, rhs: &I64Vec3) -> I64Vec3 {
1021        self.div(*rhs)
1022    }
1023}
1024
1025impl Div<&I64Vec3> for &i64 {
1026    type Output = I64Vec3;
1027    #[inline]
1028    fn div(self, rhs: &I64Vec3) -> I64Vec3 {
1029        (*self).div(*rhs)
1030    }
1031}
1032
1033impl Div<I64Vec3> for &i64 {
1034    type Output = I64Vec3;
1035    #[inline]
1036    fn div(self, rhs: I64Vec3) -> I64Vec3 {
1037        (*self).div(rhs)
1038    }
1039}
1040
1041impl Mul for I64Vec3 {
1042    type Output = Self;
1043    #[inline]
1044    fn mul(self, rhs: Self) -> Self {
1045        Self {
1046            x: self.x.mul(rhs.x),
1047            y: self.y.mul(rhs.y),
1048            z: self.z.mul(rhs.z),
1049        }
1050    }
1051}
1052
1053impl Mul<&Self> for I64Vec3 {
1054    type Output = Self;
1055    #[inline]
1056    fn mul(self, rhs: &Self) -> Self {
1057        self.mul(*rhs)
1058    }
1059}
1060
1061impl Mul<&I64Vec3> for &I64Vec3 {
1062    type Output = I64Vec3;
1063    #[inline]
1064    fn mul(self, rhs: &I64Vec3) -> I64Vec3 {
1065        (*self).mul(*rhs)
1066    }
1067}
1068
1069impl Mul<I64Vec3> for &I64Vec3 {
1070    type Output = I64Vec3;
1071    #[inline]
1072    fn mul(self, rhs: I64Vec3) -> I64Vec3 {
1073        (*self).mul(rhs)
1074    }
1075}
1076
1077impl MulAssign for I64Vec3 {
1078    #[inline]
1079    fn mul_assign(&mut self, rhs: Self) {
1080        self.x.mul_assign(rhs.x);
1081        self.y.mul_assign(rhs.y);
1082        self.z.mul_assign(rhs.z);
1083    }
1084}
1085
1086impl MulAssign<&Self> for I64Vec3 {
1087    #[inline]
1088    fn mul_assign(&mut self, rhs: &Self) {
1089        self.mul_assign(*rhs);
1090    }
1091}
1092
1093impl Mul<i64> for I64Vec3 {
1094    type Output = Self;
1095    #[inline]
1096    fn mul(self, rhs: i64) -> Self {
1097        Self {
1098            x: self.x.mul(rhs),
1099            y: self.y.mul(rhs),
1100            z: self.z.mul(rhs),
1101        }
1102    }
1103}
1104
1105impl Mul<&i64> for I64Vec3 {
1106    type Output = Self;
1107    #[inline]
1108    fn mul(self, rhs: &i64) -> Self {
1109        self.mul(*rhs)
1110    }
1111}
1112
1113impl Mul<&i64> for &I64Vec3 {
1114    type Output = I64Vec3;
1115    #[inline]
1116    fn mul(self, rhs: &i64) -> I64Vec3 {
1117        (*self).mul(*rhs)
1118    }
1119}
1120
1121impl Mul<i64> for &I64Vec3 {
1122    type Output = I64Vec3;
1123    #[inline]
1124    fn mul(self, rhs: i64) -> I64Vec3 {
1125        (*self).mul(rhs)
1126    }
1127}
1128
1129impl MulAssign<i64> for I64Vec3 {
1130    #[inline]
1131    fn mul_assign(&mut self, rhs: i64) {
1132        self.x.mul_assign(rhs);
1133        self.y.mul_assign(rhs);
1134        self.z.mul_assign(rhs);
1135    }
1136}
1137
1138impl MulAssign<&i64> for I64Vec3 {
1139    #[inline]
1140    fn mul_assign(&mut self, rhs: &i64) {
1141        self.mul_assign(*rhs);
1142    }
1143}
1144
1145impl Mul<I64Vec3> for i64 {
1146    type Output = I64Vec3;
1147    #[inline]
1148    fn mul(self, rhs: I64Vec3) -> I64Vec3 {
1149        I64Vec3 {
1150            x: self.mul(rhs.x),
1151            y: self.mul(rhs.y),
1152            z: self.mul(rhs.z),
1153        }
1154    }
1155}
1156
1157impl Mul<&I64Vec3> for i64 {
1158    type Output = I64Vec3;
1159    #[inline]
1160    fn mul(self, rhs: &I64Vec3) -> I64Vec3 {
1161        self.mul(*rhs)
1162    }
1163}
1164
1165impl Mul<&I64Vec3> for &i64 {
1166    type Output = I64Vec3;
1167    #[inline]
1168    fn mul(self, rhs: &I64Vec3) -> I64Vec3 {
1169        (*self).mul(*rhs)
1170    }
1171}
1172
1173impl Mul<I64Vec3> for &i64 {
1174    type Output = I64Vec3;
1175    #[inline]
1176    fn mul(self, rhs: I64Vec3) -> I64Vec3 {
1177        (*self).mul(rhs)
1178    }
1179}
1180
1181impl Add for I64Vec3 {
1182    type Output = Self;
1183    #[inline]
1184    fn add(self, rhs: Self) -> Self {
1185        Self {
1186            x: self.x.add(rhs.x),
1187            y: self.y.add(rhs.y),
1188            z: self.z.add(rhs.z),
1189        }
1190    }
1191}
1192
1193impl Add<&Self> for I64Vec3 {
1194    type Output = Self;
1195    #[inline]
1196    fn add(self, rhs: &Self) -> Self {
1197        self.add(*rhs)
1198    }
1199}
1200
1201impl Add<&I64Vec3> for &I64Vec3 {
1202    type Output = I64Vec3;
1203    #[inline]
1204    fn add(self, rhs: &I64Vec3) -> I64Vec3 {
1205        (*self).add(*rhs)
1206    }
1207}
1208
1209impl Add<I64Vec3> for &I64Vec3 {
1210    type Output = I64Vec3;
1211    #[inline]
1212    fn add(self, rhs: I64Vec3) -> I64Vec3 {
1213        (*self).add(rhs)
1214    }
1215}
1216
1217impl AddAssign for I64Vec3 {
1218    #[inline]
1219    fn add_assign(&mut self, rhs: Self) {
1220        self.x.add_assign(rhs.x);
1221        self.y.add_assign(rhs.y);
1222        self.z.add_assign(rhs.z);
1223    }
1224}
1225
1226impl AddAssign<&Self> for I64Vec3 {
1227    #[inline]
1228    fn add_assign(&mut self, rhs: &Self) {
1229        self.add_assign(*rhs);
1230    }
1231}
1232
1233impl Add<i64> for I64Vec3 {
1234    type Output = Self;
1235    #[inline]
1236    fn add(self, rhs: i64) -> Self {
1237        Self {
1238            x: self.x.add(rhs),
1239            y: self.y.add(rhs),
1240            z: self.z.add(rhs),
1241        }
1242    }
1243}
1244
1245impl Add<&i64> for I64Vec3 {
1246    type Output = Self;
1247    #[inline]
1248    fn add(self, rhs: &i64) -> Self {
1249        self.add(*rhs)
1250    }
1251}
1252
1253impl Add<&i64> for &I64Vec3 {
1254    type Output = I64Vec3;
1255    #[inline]
1256    fn add(self, rhs: &i64) -> I64Vec3 {
1257        (*self).add(*rhs)
1258    }
1259}
1260
1261impl Add<i64> for &I64Vec3 {
1262    type Output = I64Vec3;
1263    #[inline]
1264    fn add(self, rhs: i64) -> I64Vec3 {
1265        (*self).add(rhs)
1266    }
1267}
1268
1269impl AddAssign<i64> for I64Vec3 {
1270    #[inline]
1271    fn add_assign(&mut self, rhs: i64) {
1272        self.x.add_assign(rhs);
1273        self.y.add_assign(rhs);
1274        self.z.add_assign(rhs);
1275    }
1276}
1277
1278impl AddAssign<&i64> for I64Vec3 {
1279    #[inline]
1280    fn add_assign(&mut self, rhs: &i64) {
1281        self.add_assign(*rhs);
1282    }
1283}
1284
1285impl Add<I64Vec3> for i64 {
1286    type Output = I64Vec3;
1287    #[inline]
1288    fn add(self, rhs: I64Vec3) -> I64Vec3 {
1289        I64Vec3 {
1290            x: self.add(rhs.x),
1291            y: self.add(rhs.y),
1292            z: self.add(rhs.z),
1293        }
1294    }
1295}
1296
1297impl Add<&I64Vec3> for i64 {
1298    type Output = I64Vec3;
1299    #[inline]
1300    fn add(self, rhs: &I64Vec3) -> I64Vec3 {
1301        self.add(*rhs)
1302    }
1303}
1304
1305impl Add<&I64Vec3> for &i64 {
1306    type Output = I64Vec3;
1307    #[inline]
1308    fn add(self, rhs: &I64Vec3) -> I64Vec3 {
1309        (*self).add(*rhs)
1310    }
1311}
1312
1313impl Add<I64Vec3> for &i64 {
1314    type Output = I64Vec3;
1315    #[inline]
1316    fn add(self, rhs: I64Vec3) -> I64Vec3 {
1317        (*self).add(rhs)
1318    }
1319}
1320
1321impl Sub for I64Vec3 {
1322    type Output = Self;
1323    #[inline]
1324    fn sub(self, rhs: Self) -> Self {
1325        Self {
1326            x: self.x.sub(rhs.x),
1327            y: self.y.sub(rhs.y),
1328            z: self.z.sub(rhs.z),
1329        }
1330    }
1331}
1332
1333impl Sub<&Self> for I64Vec3 {
1334    type Output = Self;
1335    #[inline]
1336    fn sub(self, rhs: &Self) -> Self {
1337        self.sub(*rhs)
1338    }
1339}
1340
1341impl Sub<&I64Vec3> for &I64Vec3 {
1342    type Output = I64Vec3;
1343    #[inline]
1344    fn sub(self, rhs: &I64Vec3) -> I64Vec3 {
1345        (*self).sub(*rhs)
1346    }
1347}
1348
1349impl Sub<I64Vec3> for &I64Vec3 {
1350    type Output = I64Vec3;
1351    #[inline]
1352    fn sub(self, rhs: I64Vec3) -> I64Vec3 {
1353        (*self).sub(rhs)
1354    }
1355}
1356
1357impl SubAssign for I64Vec3 {
1358    #[inline]
1359    fn sub_assign(&mut self, rhs: Self) {
1360        self.x.sub_assign(rhs.x);
1361        self.y.sub_assign(rhs.y);
1362        self.z.sub_assign(rhs.z);
1363    }
1364}
1365
1366impl SubAssign<&Self> for I64Vec3 {
1367    #[inline]
1368    fn sub_assign(&mut self, rhs: &Self) {
1369        self.sub_assign(*rhs);
1370    }
1371}
1372
1373impl Sub<i64> for I64Vec3 {
1374    type Output = Self;
1375    #[inline]
1376    fn sub(self, rhs: i64) -> Self {
1377        Self {
1378            x: self.x.sub(rhs),
1379            y: self.y.sub(rhs),
1380            z: self.z.sub(rhs),
1381        }
1382    }
1383}
1384
1385impl Sub<&i64> for I64Vec3 {
1386    type Output = Self;
1387    #[inline]
1388    fn sub(self, rhs: &i64) -> Self {
1389        self.sub(*rhs)
1390    }
1391}
1392
1393impl Sub<&i64> for &I64Vec3 {
1394    type Output = I64Vec3;
1395    #[inline]
1396    fn sub(self, rhs: &i64) -> I64Vec3 {
1397        (*self).sub(*rhs)
1398    }
1399}
1400
1401impl Sub<i64> for &I64Vec3 {
1402    type Output = I64Vec3;
1403    #[inline]
1404    fn sub(self, rhs: i64) -> I64Vec3 {
1405        (*self).sub(rhs)
1406    }
1407}
1408
1409impl SubAssign<i64> for I64Vec3 {
1410    #[inline]
1411    fn sub_assign(&mut self, rhs: i64) {
1412        self.x.sub_assign(rhs);
1413        self.y.sub_assign(rhs);
1414        self.z.sub_assign(rhs);
1415    }
1416}
1417
1418impl SubAssign<&i64> for I64Vec3 {
1419    #[inline]
1420    fn sub_assign(&mut self, rhs: &i64) {
1421        self.sub_assign(*rhs);
1422    }
1423}
1424
1425impl Sub<I64Vec3> for i64 {
1426    type Output = I64Vec3;
1427    #[inline]
1428    fn sub(self, rhs: I64Vec3) -> I64Vec3 {
1429        I64Vec3 {
1430            x: self.sub(rhs.x),
1431            y: self.sub(rhs.y),
1432            z: self.sub(rhs.z),
1433        }
1434    }
1435}
1436
1437impl Sub<&I64Vec3> for i64 {
1438    type Output = I64Vec3;
1439    #[inline]
1440    fn sub(self, rhs: &I64Vec3) -> I64Vec3 {
1441        self.sub(*rhs)
1442    }
1443}
1444
1445impl Sub<&I64Vec3> for &i64 {
1446    type Output = I64Vec3;
1447    #[inline]
1448    fn sub(self, rhs: &I64Vec3) -> I64Vec3 {
1449        (*self).sub(*rhs)
1450    }
1451}
1452
1453impl Sub<I64Vec3> for &i64 {
1454    type Output = I64Vec3;
1455    #[inline]
1456    fn sub(self, rhs: I64Vec3) -> I64Vec3 {
1457        (*self).sub(rhs)
1458    }
1459}
1460
1461impl Rem for I64Vec3 {
1462    type Output = Self;
1463    #[inline]
1464    fn rem(self, rhs: Self) -> Self {
1465        Self {
1466            x: self.x.rem(rhs.x),
1467            y: self.y.rem(rhs.y),
1468            z: self.z.rem(rhs.z),
1469        }
1470    }
1471}
1472
1473impl Rem<&Self> for I64Vec3 {
1474    type Output = Self;
1475    #[inline]
1476    fn rem(self, rhs: &Self) -> Self {
1477        self.rem(*rhs)
1478    }
1479}
1480
1481impl Rem<&I64Vec3> for &I64Vec3 {
1482    type Output = I64Vec3;
1483    #[inline]
1484    fn rem(self, rhs: &I64Vec3) -> I64Vec3 {
1485        (*self).rem(*rhs)
1486    }
1487}
1488
1489impl Rem<I64Vec3> for &I64Vec3 {
1490    type Output = I64Vec3;
1491    #[inline]
1492    fn rem(self, rhs: I64Vec3) -> I64Vec3 {
1493        (*self).rem(rhs)
1494    }
1495}
1496
1497impl RemAssign for I64Vec3 {
1498    #[inline]
1499    fn rem_assign(&mut self, rhs: Self) {
1500        self.x.rem_assign(rhs.x);
1501        self.y.rem_assign(rhs.y);
1502        self.z.rem_assign(rhs.z);
1503    }
1504}
1505
1506impl RemAssign<&Self> for I64Vec3 {
1507    #[inline]
1508    fn rem_assign(&mut self, rhs: &Self) {
1509        self.rem_assign(*rhs);
1510    }
1511}
1512
1513impl Rem<i64> for I64Vec3 {
1514    type Output = Self;
1515    #[inline]
1516    fn rem(self, rhs: i64) -> Self {
1517        Self {
1518            x: self.x.rem(rhs),
1519            y: self.y.rem(rhs),
1520            z: self.z.rem(rhs),
1521        }
1522    }
1523}
1524
1525impl Rem<&i64> for I64Vec3 {
1526    type Output = Self;
1527    #[inline]
1528    fn rem(self, rhs: &i64) -> Self {
1529        self.rem(*rhs)
1530    }
1531}
1532
1533impl Rem<&i64> for &I64Vec3 {
1534    type Output = I64Vec3;
1535    #[inline]
1536    fn rem(self, rhs: &i64) -> I64Vec3 {
1537        (*self).rem(*rhs)
1538    }
1539}
1540
1541impl Rem<i64> for &I64Vec3 {
1542    type Output = I64Vec3;
1543    #[inline]
1544    fn rem(self, rhs: i64) -> I64Vec3 {
1545        (*self).rem(rhs)
1546    }
1547}
1548
1549impl RemAssign<i64> for I64Vec3 {
1550    #[inline]
1551    fn rem_assign(&mut self, rhs: i64) {
1552        self.x.rem_assign(rhs);
1553        self.y.rem_assign(rhs);
1554        self.z.rem_assign(rhs);
1555    }
1556}
1557
1558impl RemAssign<&i64> for I64Vec3 {
1559    #[inline]
1560    fn rem_assign(&mut self, rhs: &i64) {
1561        self.rem_assign(*rhs);
1562    }
1563}
1564
1565impl Rem<I64Vec3> for i64 {
1566    type Output = I64Vec3;
1567    #[inline]
1568    fn rem(self, rhs: I64Vec3) -> I64Vec3 {
1569        I64Vec3 {
1570            x: self.rem(rhs.x),
1571            y: self.rem(rhs.y),
1572            z: self.rem(rhs.z),
1573        }
1574    }
1575}
1576
1577impl Rem<&I64Vec3> for i64 {
1578    type Output = I64Vec3;
1579    #[inline]
1580    fn rem(self, rhs: &I64Vec3) -> I64Vec3 {
1581        self.rem(*rhs)
1582    }
1583}
1584
1585impl Rem<&I64Vec3> for &i64 {
1586    type Output = I64Vec3;
1587    #[inline]
1588    fn rem(self, rhs: &I64Vec3) -> I64Vec3 {
1589        (*self).rem(*rhs)
1590    }
1591}
1592
1593impl Rem<I64Vec3> for &i64 {
1594    type Output = I64Vec3;
1595    #[inline]
1596    fn rem(self, rhs: I64Vec3) -> I64Vec3 {
1597        (*self).rem(rhs)
1598    }
1599}
1600
1601impl AsRef<[i64; 3]> for I64Vec3 {
1602    #[inline]
1603    fn as_ref(&self) -> &[i64; 3] {
1604        unsafe { &*(self as *const Self as *const [i64; 3]) }
1605    }
1606}
1607
1608impl AsMut<[i64; 3]> for I64Vec3 {
1609    #[inline]
1610    fn as_mut(&mut self) -> &mut [i64; 3] {
1611        unsafe { &mut *(self as *mut Self as *mut [i64; 3]) }
1612    }
1613}
1614
1615impl Sum for I64Vec3 {
1616    #[inline]
1617    fn sum<I>(iter: I) -> Self
1618    where
1619        I: Iterator<Item = Self>,
1620    {
1621        iter.fold(Self::ZERO, Self::add)
1622    }
1623}
1624
1625impl<'a> Sum<&'a Self> for I64Vec3 {
1626    #[inline]
1627    fn sum<I>(iter: I) -> Self
1628    where
1629        I: Iterator<Item = &'a Self>,
1630    {
1631        iter.fold(Self::ZERO, |a, &b| Self::add(a, b))
1632    }
1633}
1634
1635impl Product for I64Vec3 {
1636    #[inline]
1637    fn product<I>(iter: I) -> Self
1638    where
1639        I: Iterator<Item = Self>,
1640    {
1641        iter.fold(Self::ONE, Self::mul)
1642    }
1643}
1644
1645impl<'a> Product<&'a Self> for I64Vec3 {
1646    #[inline]
1647    fn product<I>(iter: I) -> Self
1648    where
1649        I: Iterator<Item = &'a Self>,
1650    {
1651        iter.fold(Self::ONE, |a, &b| Self::mul(a, b))
1652    }
1653}
1654
1655impl Neg for I64Vec3 {
1656    type Output = Self;
1657    #[inline]
1658    fn neg(self) -> Self {
1659        Self {
1660            x: self.x.neg(),
1661            y: self.y.neg(),
1662            z: self.z.neg(),
1663        }
1664    }
1665}
1666
1667impl Neg for &I64Vec3 {
1668    type Output = I64Vec3;
1669    #[inline]
1670    fn neg(self) -> I64Vec3 {
1671        (*self).neg()
1672    }
1673}
1674
1675impl Not for I64Vec3 {
1676    type Output = Self;
1677    #[inline]
1678    fn not(self) -> Self {
1679        Self {
1680            x: self.x.not(),
1681            y: self.y.not(),
1682            z: self.z.not(),
1683        }
1684    }
1685}
1686
1687impl Not for &I64Vec3 {
1688    type Output = I64Vec3;
1689    #[inline]
1690    fn not(self) -> I64Vec3 {
1691        (*self).not()
1692    }
1693}
1694
1695impl BitAnd for I64Vec3 {
1696    type Output = Self;
1697    #[inline]
1698    fn bitand(self, rhs: Self) -> Self::Output {
1699        Self {
1700            x: self.x.bitand(rhs.x),
1701            y: self.y.bitand(rhs.y),
1702            z: self.z.bitand(rhs.z),
1703        }
1704    }
1705}
1706
1707impl BitAnd<&Self> for I64Vec3 {
1708    type Output = Self;
1709    #[inline]
1710    fn bitand(self, rhs: &Self) -> Self {
1711        self.bitand(*rhs)
1712    }
1713}
1714
1715impl BitAnd<&I64Vec3> for &I64Vec3 {
1716    type Output = I64Vec3;
1717    #[inline]
1718    fn bitand(self, rhs: &I64Vec3) -> I64Vec3 {
1719        (*self).bitand(*rhs)
1720    }
1721}
1722
1723impl BitAnd<I64Vec3> for &I64Vec3 {
1724    type Output = I64Vec3;
1725    #[inline]
1726    fn bitand(self, rhs: I64Vec3) -> I64Vec3 {
1727        (*self).bitand(rhs)
1728    }
1729}
1730
1731impl BitAndAssign for I64Vec3 {
1732    #[inline]
1733    fn bitand_assign(&mut self, rhs: Self) {
1734        *self = self.bitand(rhs);
1735    }
1736}
1737
1738impl BitAndAssign<&Self> for I64Vec3 {
1739    #[inline]
1740    fn bitand_assign(&mut self, rhs: &Self) {
1741        self.bitand_assign(*rhs);
1742    }
1743}
1744
1745impl BitOr for I64Vec3 {
1746    type Output = Self;
1747    #[inline]
1748    fn bitor(self, rhs: Self) -> Self::Output {
1749        Self {
1750            x: self.x.bitor(rhs.x),
1751            y: self.y.bitor(rhs.y),
1752            z: self.z.bitor(rhs.z),
1753        }
1754    }
1755}
1756
1757impl BitOr<&Self> for I64Vec3 {
1758    type Output = Self;
1759    #[inline]
1760    fn bitor(self, rhs: &Self) -> Self {
1761        self.bitor(*rhs)
1762    }
1763}
1764
1765impl BitOr<&I64Vec3> for &I64Vec3 {
1766    type Output = I64Vec3;
1767    #[inline]
1768    fn bitor(self, rhs: &I64Vec3) -> I64Vec3 {
1769        (*self).bitor(*rhs)
1770    }
1771}
1772
1773impl BitOr<I64Vec3> for &I64Vec3 {
1774    type Output = I64Vec3;
1775    #[inline]
1776    fn bitor(self, rhs: I64Vec3) -> I64Vec3 {
1777        (*self).bitor(rhs)
1778    }
1779}
1780
1781impl BitOrAssign for I64Vec3 {
1782    #[inline]
1783    fn bitor_assign(&mut self, rhs: Self) {
1784        *self = self.bitor(rhs);
1785    }
1786}
1787
1788impl BitOrAssign<&Self> for I64Vec3 {
1789    #[inline]
1790    fn bitor_assign(&mut self, rhs: &Self) {
1791        self.bitor_assign(*rhs);
1792    }
1793}
1794
1795impl BitXor for I64Vec3 {
1796    type Output = Self;
1797    #[inline]
1798    fn bitxor(self, rhs: Self) -> Self::Output {
1799        Self {
1800            x: self.x.bitxor(rhs.x),
1801            y: self.y.bitxor(rhs.y),
1802            z: self.z.bitxor(rhs.z),
1803        }
1804    }
1805}
1806
1807impl BitXor<&Self> for I64Vec3 {
1808    type Output = Self;
1809    #[inline]
1810    fn bitxor(self, rhs: &Self) -> Self {
1811        self.bitxor(*rhs)
1812    }
1813}
1814
1815impl BitXor<&I64Vec3> for &I64Vec3 {
1816    type Output = I64Vec3;
1817    #[inline]
1818    fn bitxor(self, rhs: &I64Vec3) -> I64Vec3 {
1819        (*self).bitxor(*rhs)
1820    }
1821}
1822
1823impl BitXor<I64Vec3> for &I64Vec3 {
1824    type Output = I64Vec3;
1825    #[inline]
1826    fn bitxor(self, rhs: I64Vec3) -> I64Vec3 {
1827        (*self).bitxor(rhs)
1828    }
1829}
1830
1831impl BitXorAssign for I64Vec3 {
1832    #[inline]
1833    fn bitxor_assign(&mut self, rhs: Self) {
1834        *self = self.bitxor(rhs);
1835    }
1836}
1837
1838impl BitXorAssign<&Self> for I64Vec3 {
1839    #[inline]
1840    fn bitxor_assign(&mut self, rhs: &Self) {
1841        self.bitxor_assign(*rhs);
1842    }
1843}
1844
1845impl BitAnd<i64> for I64Vec3 {
1846    type Output = Self;
1847    #[inline]
1848    fn bitand(self, rhs: i64) -> Self::Output {
1849        Self {
1850            x: self.x.bitand(rhs),
1851            y: self.y.bitand(rhs),
1852            z: self.z.bitand(rhs),
1853        }
1854    }
1855}
1856
1857impl BitAnd<&i64> for I64Vec3 {
1858    type Output = Self;
1859    #[inline]
1860    fn bitand(self, rhs: &i64) -> Self {
1861        self.bitand(*rhs)
1862    }
1863}
1864
1865impl BitAnd<&i64> for &I64Vec3 {
1866    type Output = I64Vec3;
1867    #[inline]
1868    fn bitand(self, rhs: &i64) -> I64Vec3 {
1869        (*self).bitand(*rhs)
1870    }
1871}
1872
1873impl BitAnd<i64> for &I64Vec3 {
1874    type Output = I64Vec3;
1875    #[inline]
1876    fn bitand(self, rhs: i64) -> I64Vec3 {
1877        (*self).bitand(rhs)
1878    }
1879}
1880
1881impl BitAndAssign<i64> for I64Vec3 {
1882    #[inline]
1883    fn bitand_assign(&mut self, rhs: i64) {
1884        *self = self.bitand(rhs);
1885    }
1886}
1887
1888impl BitAndAssign<&i64> for I64Vec3 {
1889    #[inline]
1890    fn bitand_assign(&mut self, rhs: &i64) {
1891        self.bitand_assign(*rhs);
1892    }
1893}
1894
1895impl BitOr<i64> for I64Vec3 {
1896    type Output = Self;
1897    #[inline]
1898    fn bitor(self, rhs: i64) -> Self::Output {
1899        Self {
1900            x: self.x.bitor(rhs),
1901            y: self.y.bitor(rhs),
1902            z: self.z.bitor(rhs),
1903        }
1904    }
1905}
1906
1907impl BitOr<&i64> for I64Vec3 {
1908    type Output = Self;
1909    #[inline]
1910    fn bitor(self, rhs: &i64) -> Self {
1911        self.bitor(*rhs)
1912    }
1913}
1914
1915impl BitOr<&i64> for &I64Vec3 {
1916    type Output = I64Vec3;
1917    #[inline]
1918    fn bitor(self, rhs: &i64) -> I64Vec3 {
1919        (*self).bitor(*rhs)
1920    }
1921}
1922
1923impl BitOr<i64> for &I64Vec3 {
1924    type Output = I64Vec3;
1925    #[inline]
1926    fn bitor(self, rhs: i64) -> I64Vec3 {
1927        (*self).bitor(rhs)
1928    }
1929}
1930
1931impl BitOrAssign<i64> for I64Vec3 {
1932    #[inline]
1933    fn bitor_assign(&mut self, rhs: i64) {
1934        *self = self.bitor(rhs);
1935    }
1936}
1937
1938impl BitOrAssign<&i64> for I64Vec3 {
1939    #[inline]
1940    fn bitor_assign(&mut self, rhs: &i64) {
1941        self.bitor_assign(*rhs);
1942    }
1943}
1944
1945impl BitXor<i64> for I64Vec3 {
1946    type Output = Self;
1947    #[inline]
1948    fn bitxor(self, rhs: i64) -> Self::Output {
1949        Self {
1950            x: self.x.bitxor(rhs),
1951            y: self.y.bitxor(rhs),
1952            z: self.z.bitxor(rhs),
1953        }
1954    }
1955}
1956
1957impl BitXor<&i64> for I64Vec3 {
1958    type Output = Self;
1959    #[inline]
1960    fn bitxor(self, rhs: &i64) -> Self {
1961        self.bitxor(*rhs)
1962    }
1963}
1964
1965impl BitXor<&i64> for &I64Vec3 {
1966    type Output = I64Vec3;
1967    #[inline]
1968    fn bitxor(self, rhs: &i64) -> I64Vec3 {
1969        (*self).bitxor(*rhs)
1970    }
1971}
1972
1973impl BitXor<i64> for &I64Vec3 {
1974    type Output = I64Vec3;
1975    #[inline]
1976    fn bitxor(self, rhs: i64) -> I64Vec3 {
1977        (*self).bitxor(rhs)
1978    }
1979}
1980
1981impl BitXorAssign<i64> for I64Vec3 {
1982    #[inline]
1983    fn bitxor_assign(&mut self, rhs: i64) {
1984        *self = self.bitxor(rhs);
1985    }
1986}
1987
1988impl BitXorAssign<&i64> for I64Vec3 {
1989    #[inline]
1990    fn bitxor_assign(&mut self, rhs: &i64) {
1991        self.bitxor_assign(*rhs);
1992    }
1993}
1994
1995impl Shl<i8> for I64Vec3 {
1996    type Output = Self;
1997    #[inline]
1998    fn shl(self, rhs: i8) -> Self::Output {
1999        Self {
2000            x: self.x.shl(rhs),
2001            y: self.y.shl(rhs),
2002            z: self.z.shl(rhs),
2003        }
2004    }
2005}
2006
2007impl Shl<&i8> for I64Vec3 {
2008    type Output = Self;
2009    #[inline]
2010    fn shl(self, rhs: &i8) -> Self {
2011        self.shl(*rhs)
2012    }
2013}
2014
2015impl Shl<&i8> for &I64Vec3 {
2016    type Output = I64Vec3;
2017    #[inline]
2018    fn shl(self, rhs: &i8) -> I64Vec3 {
2019        (*self).shl(*rhs)
2020    }
2021}
2022
2023impl Shl<i8> for &I64Vec3 {
2024    type Output = I64Vec3;
2025    #[inline]
2026    fn shl(self, rhs: i8) -> I64Vec3 {
2027        (*self).shl(rhs)
2028    }
2029}
2030
2031impl ShlAssign<i8> for I64Vec3 {
2032    #[inline]
2033    fn shl_assign(&mut self, rhs: i8) {
2034        *self = self.shl(rhs);
2035    }
2036}
2037
2038impl ShlAssign<&i8> for I64Vec3 {
2039    #[inline]
2040    fn shl_assign(&mut self, rhs: &i8) {
2041        self.shl_assign(*rhs);
2042    }
2043}
2044
2045impl Shr<i8> for I64Vec3 {
2046    type Output = Self;
2047    #[inline]
2048    fn shr(self, rhs: i8) -> Self::Output {
2049        Self {
2050            x: self.x.shr(rhs),
2051            y: self.y.shr(rhs),
2052            z: self.z.shr(rhs),
2053        }
2054    }
2055}
2056
2057impl Shr<&i8> for I64Vec3 {
2058    type Output = Self;
2059    #[inline]
2060    fn shr(self, rhs: &i8) -> Self {
2061        self.shr(*rhs)
2062    }
2063}
2064
2065impl Shr<&i8> for &I64Vec3 {
2066    type Output = I64Vec3;
2067    #[inline]
2068    fn shr(self, rhs: &i8) -> I64Vec3 {
2069        (*self).shr(*rhs)
2070    }
2071}
2072
2073impl Shr<i8> for &I64Vec3 {
2074    type Output = I64Vec3;
2075    #[inline]
2076    fn shr(self, rhs: i8) -> I64Vec3 {
2077        (*self).shr(rhs)
2078    }
2079}
2080
2081impl ShrAssign<i8> for I64Vec3 {
2082    #[inline]
2083    fn shr_assign(&mut self, rhs: i8) {
2084        *self = self.shr(rhs);
2085    }
2086}
2087
2088impl ShrAssign<&i8> for I64Vec3 {
2089    #[inline]
2090    fn shr_assign(&mut self, rhs: &i8) {
2091        self.shr_assign(*rhs);
2092    }
2093}
2094
2095impl Shl<i16> for I64Vec3 {
2096    type Output = Self;
2097    #[inline]
2098    fn shl(self, rhs: i16) -> Self::Output {
2099        Self {
2100            x: self.x.shl(rhs),
2101            y: self.y.shl(rhs),
2102            z: self.z.shl(rhs),
2103        }
2104    }
2105}
2106
2107impl Shl<&i16> for I64Vec3 {
2108    type Output = Self;
2109    #[inline]
2110    fn shl(self, rhs: &i16) -> Self {
2111        self.shl(*rhs)
2112    }
2113}
2114
2115impl Shl<&i16> for &I64Vec3 {
2116    type Output = I64Vec3;
2117    #[inline]
2118    fn shl(self, rhs: &i16) -> I64Vec3 {
2119        (*self).shl(*rhs)
2120    }
2121}
2122
2123impl Shl<i16> for &I64Vec3 {
2124    type Output = I64Vec3;
2125    #[inline]
2126    fn shl(self, rhs: i16) -> I64Vec3 {
2127        (*self).shl(rhs)
2128    }
2129}
2130
2131impl ShlAssign<i16> for I64Vec3 {
2132    #[inline]
2133    fn shl_assign(&mut self, rhs: i16) {
2134        *self = self.shl(rhs);
2135    }
2136}
2137
2138impl ShlAssign<&i16> for I64Vec3 {
2139    #[inline]
2140    fn shl_assign(&mut self, rhs: &i16) {
2141        self.shl_assign(*rhs);
2142    }
2143}
2144
2145impl Shr<i16> for I64Vec3 {
2146    type Output = Self;
2147    #[inline]
2148    fn shr(self, rhs: i16) -> Self::Output {
2149        Self {
2150            x: self.x.shr(rhs),
2151            y: self.y.shr(rhs),
2152            z: self.z.shr(rhs),
2153        }
2154    }
2155}
2156
2157impl Shr<&i16> for I64Vec3 {
2158    type Output = Self;
2159    #[inline]
2160    fn shr(self, rhs: &i16) -> Self {
2161        self.shr(*rhs)
2162    }
2163}
2164
2165impl Shr<&i16> for &I64Vec3 {
2166    type Output = I64Vec3;
2167    #[inline]
2168    fn shr(self, rhs: &i16) -> I64Vec3 {
2169        (*self).shr(*rhs)
2170    }
2171}
2172
2173impl Shr<i16> for &I64Vec3 {
2174    type Output = I64Vec3;
2175    #[inline]
2176    fn shr(self, rhs: i16) -> I64Vec3 {
2177        (*self).shr(rhs)
2178    }
2179}
2180
2181impl ShrAssign<i16> for I64Vec3 {
2182    #[inline]
2183    fn shr_assign(&mut self, rhs: i16) {
2184        *self = self.shr(rhs);
2185    }
2186}
2187
2188impl ShrAssign<&i16> for I64Vec3 {
2189    #[inline]
2190    fn shr_assign(&mut self, rhs: &i16) {
2191        self.shr_assign(*rhs);
2192    }
2193}
2194
2195impl Shl<i32> for I64Vec3 {
2196    type Output = Self;
2197    #[inline]
2198    fn shl(self, rhs: i32) -> Self::Output {
2199        Self {
2200            x: self.x.shl(rhs),
2201            y: self.y.shl(rhs),
2202            z: self.z.shl(rhs),
2203        }
2204    }
2205}
2206
2207impl Shl<&i32> for I64Vec3 {
2208    type Output = Self;
2209    #[inline]
2210    fn shl(self, rhs: &i32) -> Self {
2211        self.shl(*rhs)
2212    }
2213}
2214
2215impl Shl<&i32> for &I64Vec3 {
2216    type Output = I64Vec3;
2217    #[inline]
2218    fn shl(self, rhs: &i32) -> I64Vec3 {
2219        (*self).shl(*rhs)
2220    }
2221}
2222
2223impl Shl<i32> for &I64Vec3 {
2224    type Output = I64Vec3;
2225    #[inline]
2226    fn shl(self, rhs: i32) -> I64Vec3 {
2227        (*self).shl(rhs)
2228    }
2229}
2230
2231impl ShlAssign<i32> for I64Vec3 {
2232    #[inline]
2233    fn shl_assign(&mut self, rhs: i32) {
2234        *self = self.shl(rhs);
2235    }
2236}
2237
2238impl ShlAssign<&i32> for I64Vec3 {
2239    #[inline]
2240    fn shl_assign(&mut self, rhs: &i32) {
2241        self.shl_assign(*rhs);
2242    }
2243}
2244
2245impl Shr<i32> for I64Vec3 {
2246    type Output = Self;
2247    #[inline]
2248    fn shr(self, rhs: i32) -> Self::Output {
2249        Self {
2250            x: self.x.shr(rhs),
2251            y: self.y.shr(rhs),
2252            z: self.z.shr(rhs),
2253        }
2254    }
2255}
2256
2257impl Shr<&i32> for I64Vec3 {
2258    type Output = Self;
2259    #[inline]
2260    fn shr(self, rhs: &i32) -> Self {
2261        self.shr(*rhs)
2262    }
2263}
2264
2265impl Shr<&i32> for &I64Vec3 {
2266    type Output = I64Vec3;
2267    #[inline]
2268    fn shr(self, rhs: &i32) -> I64Vec3 {
2269        (*self).shr(*rhs)
2270    }
2271}
2272
2273impl Shr<i32> for &I64Vec3 {
2274    type Output = I64Vec3;
2275    #[inline]
2276    fn shr(self, rhs: i32) -> I64Vec3 {
2277        (*self).shr(rhs)
2278    }
2279}
2280
2281impl ShrAssign<i32> for I64Vec3 {
2282    #[inline]
2283    fn shr_assign(&mut self, rhs: i32) {
2284        *self = self.shr(rhs);
2285    }
2286}
2287
2288impl ShrAssign<&i32> for I64Vec3 {
2289    #[inline]
2290    fn shr_assign(&mut self, rhs: &i32) {
2291        self.shr_assign(*rhs);
2292    }
2293}
2294
2295impl Shl<i64> for I64Vec3 {
2296    type Output = Self;
2297    #[inline]
2298    fn shl(self, rhs: i64) -> Self::Output {
2299        Self {
2300            x: self.x.shl(rhs),
2301            y: self.y.shl(rhs),
2302            z: self.z.shl(rhs),
2303        }
2304    }
2305}
2306
2307impl Shl<&i64> for I64Vec3 {
2308    type Output = Self;
2309    #[inline]
2310    fn shl(self, rhs: &i64) -> Self {
2311        self.shl(*rhs)
2312    }
2313}
2314
2315impl Shl<&i64> for &I64Vec3 {
2316    type Output = I64Vec3;
2317    #[inline]
2318    fn shl(self, rhs: &i64) -> I64Vec3 {
2319        (*self).shl(*rhs)
2320    }
2321}
2322
2323impl Shl<i64> for &I64Vec3 {
2324    type Output = I64Vec3;
2325    #[inline]
2326    fn shl(self, rhs: i64) -> I64Vec3 {
2327        (*self).shl(rhs)
2328    }
2329}
2330
2331impl ShlAssign<i64> for I64Vec3 {
2332    #[inline]
2333    fn shl_assign(&mut self, rhs: i64) {
2334        *self = self.shl(rhs);
2335    }
2336}
2337
2338impl ShlAssign<&i64> for I64Vec3 {
2339    #[inline]
2340    fn shl_assign(&mut self, rhs: &i64) {
2341        self.shl_assign(*rhs);
2342    }
2343}
2344
2345impl Shr<i64> for I64Vec3 {
2346    type Output = Self;
2347    #[inline]
2348    fn shr(self, rhs: i64) -> Self::Output {
2349        Self {
2350            x: self.x.shr(rhs),
2351            y: self.y.shr(rhs),
2352            z: self.z.shr(rhs),
2353        }
2354    }
2355}
2356
2357impl Shr<&i64> for I64Vec3 {
2358    type Output = Self;
2359    #[inline]
2360    fn shr(self, rhs: &i64) -> Self {
2361        self.shr(*rhs)
2362    }
2363}
2364
2365impl Shr<&i64> for &I64Vec3 {
2366    type Output = I64Vec3;
2367    #[inline]
2368    fn shr(self, rhs: &i64) -> I64Vec3 {
2369        (*self).shr(*rhs)
2370    }
2371}
2372
2373impl Shr<i64> for &I64Vec3 {
2374    type Output = I64Vec3;
2375    #[inline]
2376    fn shr(self, rhs: i64) -> I64Vec3 {
2377        (*self).shr(rhs)
2378    }
2379}
2380
2381impl ShrAssign<i64> for I64Vec3 {
2382    #[inline]
2383    fn shr_assign(&mut self, rhs: i64) {
2384        *self = self.shr(rhs);
2385    }
2386}
2387
2388impl ShrAssign<&i64> for I64Vec3 {
2389    #[inline]
2390    fn shr_assign(&mut self, rhs: &i64) {
2391        self.shr_assign(*rhs);
2392    }
2393}
2394
2395impl Shl<u8> for I64Vec3 {
2396    type Output = Self;
2397    #[inline]
2398    fn shl(self, rhs: u8) -> Self::Output {
2399        Self {
2400            x: self.x.shl(rhs),
2401            y: self.y.shl(rhs),
2402            z: self.z.shl(rhs),
2403        }
2404    }
2405}
2406
2407impl Shl<&u8> for I64Vec3 {
2408    type Output = Self;
2409    #[inline]
2410    fn shl(self, rhs: &u8) -> Self {
2411        self.shl(*rhs)
2412    }
2413}
2414
2415impl Shl<&u8> for &I64Vec3 {
2416    type Output = I64Vec3;
2417    #[inline]
2418    fn shl(self, rhs: &u8) -> I64Vec3 {
2419        (*self).shl(*rhs)
2420    }
2421}
2422
2423impl Shl<u8> for &I64Vec3 {
2424    type Output = I64Vec3;
2425    #[inline]
2426    fn shl(self, rhs: u8) -> I64Vec3 {
2427        (*self).shl(rhs)
2428    }
2429}
2430
2431impl ShlAssign<u8> for I64Vec3 {
2432    #[inline]
2433    fn shl_assign(&mut self, rhs: u8) {
2434        *self = self.shl(rhs);
2435    }
2436}
2437
2438impl ShlAssign<&u8> for I64Vec3 {
2439    #[inline]
2440    fn shl_assign(&mut self, rhs: &u8) {
2441        self.shl_assign(*rhs);
2442    }
2443}
2444
2445impl Shr<u8> for I64Vec3 {
2446    type Output = Self;
2447    #[inline]
2448    fn shr(self, rhs: u8) -> Self::Output {
2449        Self {
2450            x: self.x.shr(rhs),
2451            y: self.y.shr(rhs),
2452            z: self.z.shr(rhs),
2453        }
2454    }
2455}
2456
2457impl Shr<&u8> for I64Vec3 {
2458    type Output = Self;
2459    #[inline]
2460    fn shr(self, rhs: &u8) -> Self {
2461        self.shr(*rhs)
2462    }
2463}
2464
2465impl Shr<&u8> for &I64Vec3 {
2466    type Output = I64Vec3;
2467    #[inline]
2468    fn shr(self, rhs: &u8) -> I64Vec3 {
2469        (*self).shr(*rhs)
2470    }
2471}
2472
2473impl Shr<u8> for &I64Vec3 {
2474    type Output = I64Vec3;
2475    #[inline]
2476    fn shr(self, rhs: u8) -> I64Vec3 {
2477        (*self).shr(rhs)
2478    }
2479}
2480
2481impl ShrAssign<u8> for I64Vec3 {
2482    #[inline]
2483    fn shr_assign(&mut self, rhs: u8) {
2484        *self = self.shr(rhs);
2485    }
2486}
2487
2488impl ShrAssign<&u8> for I64Vec3 {
2489    #[inline]
2490    fn shr_assign(&mut self, rhs: &u8) {
2491        self.shr_assign(*rhs);
2492    }
2493}
2494
2495impl Shl<u16> for I64Vec3 {
2496    type Output = Self;
2497    #[inline]
2498    fn shl(self, rhs: u16) -> Self::Output {
2499        Self {
2500            x: self.x.shl(rhs),
2501            y: self.y.shl(rhs),
2502            z: self.z.shl(rhs),
2503        }
2504    }
2505}
2506
2507impl Shl<&u16> for I64Vec3 {
2508    type Output = Self;
2509    #[inline]
2510    fn shl(self, rhs: &u16) -> Self {
2511        self.shl(*rhs)
2512    }
2513}
2514
2515impl Shl<&u16> for &I64Vec3 {
2516    type Output = I64Vec3;
2517    #[inline]
2518    fn shl(self, rhs: &u16) -> I64Vec3 {
2519        (*self).shl(*rhs)
2520    }
2521}
2522
2523impl Shl<u16> for &I64Vec3 {
2524    type Output = I64Vec3;
2525    #[inline]
2526    fn shl(self, rhs: u16) -> I64Vec3 {
2527        (*self).shl(rhs)
2528    }
2529}
2530
2531impl ShlAssign<u16> for I64Vec3 {
2532    #[inline]
2533    fn shl_assign(&mut self, rhs: u16) {
2534        *self = self.shl(rhs);
2535    }
2536}
2537
2538impl ShlAssign<&u16> for I64Vec3 {
2539    #[inline]
2540    fn shl_assign(&mut self, rhs: &u16) {
2541        self.shl_assign(*rhs);
2542    }
2543}
2544
2545impl Shr<u16> for I64Vec3 {
2546    type Output = Self;
2547    #[inline]
2548    fn shr(self, rhs: u16) -> Self::Output {
2549        Self {
2550            x: self.x.shr(rhs),
2551            y: self.y.shr(rhs),
2552            z: self.z.shr(rhs),
2553        }
2554    }
2555}
2556
2557impl Shr<&u16> for I64Vec3 {
2558    type Output = Self;
2559    #[inline]
2560    fn shr(self, rhs: &u16) -> Self {
2561        self.shr(*rhs)
2562    }
2563}
2564
2565impl Shr<&u16> for &I64Vec3 {
2566    type Output = I64Vec3;
2567    #[inline]
2568    fn shr(self, rhs: &u16) -> I64Vec3 {
2569        (*self).shr(*rhs)
2570    }
2571}
2572
2573impl Shr<u16> for &I64Vec3 {
2574    type Output = I64Vec3;
2575    #[inline]
2576    fn shr(self, rhs: u16) -> I64Vec3 {
2577        (*self).shr(rhs)
2578    }
2579}
2580
2581impl ShrAssign<u16> for I64Vec3 {
2582    #[inline]
2583    fn shr_assign(&mut self, rhs: u16) {
2584        *self = self.shr(rhs);
2585    }
2586}
2587
2588impl ShrAssign<&u16> for I64Vec3 {
2589    #[inline]
2590    fn shr_assign(&mut self, rhs: &u16) {
2591        self.shr_assign(*rhs);
2592    }
2593}
2594
2595impl Shl<u32> for I64Vec3 {
2596    type Output = Self;
2597    #[inline]
2598    fn shl(self, rhs: u32) -> Self::Output {
2599        Self {
2600            x: self.x.shl(rhs),
2601            y: self.y.shl(rhs),
2602            z: self.z.shl(rhs),
2603        }
2604    }
2605}
2606
2607impl Shl<&u32> for I64Vec3 {
2608    type Output = Self;
2609    #[inline]
2610    fn shl(self, rhs: &u32) -> Self {
2611        self.shl(*rhs)
2612    }
2613}
2614
2615impl Shl<&u32> for &I64Vec3 {
2616    type Output = I64Vec3;
2617    #[inline]
2618    fn shl(self, rhs: &u32) -> I64Vec3 {
2619        (*self).shl(*rhs)
2620    }
2621}
2622
2623impl Shl<u32> for &I64Vec3 {
2624    type Output = I64Vec3;
2625    #[inline]
2626    fn shl(self, rhs: u32) -> I64Vec3 {
2627        (*self).shl(rhs)
2628    }
2629}
2630
2631impl ShlAssign<u32> for I64Vec3 {
2632    #[inline]
2633    fn shl_assign(&mut self, rhs: u32) {
2634        *self = self.shl(rhs);
2635    }
2636}
2637
2638impl ShlAssign<&u32> for I64Vec3 {
2639    #[inline]
2640    fn shl_assign(&mut self, rhs: &u32) {
2641        self.shl_assign(*rhs);
2642    }
2643}
2644
2645impl Shr<u32> for I64Vec3 {
2646    type Output = Self;
2647    #[inline]
2648    fn shr(self, rhs: u32) -> Self::Output {
2649        Self {
2650            x: self.x.shr(rhs),
2651            y: self.y.shr(rhs),
2652            z: self.z.shr(rhs),
2653        }
2654    }
2655}
2656
2657impl Shr<&u32> for I64Vec3 {
2658    type Output = Self;
2659    #[inline]
2660    fn shr(self, rhs: &u32) -> Self {
2661        self.shr(*rhs)
2662    }
2663}
2664
2665impl Shr<&u32> for &I64Vec3 {
2666    type Output = I64Vec3;
2667    #[inline]
2668    fn shr(self, rhs: &u32) -> I64Vec3 {
2669        (*self).shr(*rhs)
2670    }
2671}
2672
2673impl Shr<u32> for &I64Vec3 {
2674    type Output = I64Vec3;
2675    #[inline]
2676    fn shr(self, rhs: u32) -> I64Vec3 {
2677        (*self).shr(rhs)
2678    }
2679}
2680
2681impl ShrAssign<u32> for I64Vec3 {
2682    #[inline]
2683    fn shr_assign(&mut self, rhs: u32) {
2684        *self = self.shr(rhs);
2685    }
2686}
2687
2688impl ShrAssign<&u32> for I64Vec3 {
2689    #[inline]
2690    fn shr_assign(&mut self, rhs: &u32) {
2691        self.shr_assign(*rhs);
2692    }
2693}
2694
2695impl Shl<u64> for I64Vec3 {
2696    type Output = Self;
2697    #[inline]
2698    fn shl(self, rhs: u64) -> Self::Output {
2699        Self {
2700            x: self.x.shl(rhs),
2701            y: self.y.shl(rhs),
2702            z: self.z.shl(rhs),
2703        }
2704    }
2705}
2706
2707impl Shl<&u64> for I64Vec3 {
2708    type Output = Self;
2709    #[inline]
2710    fn shl(self, rhs: &u64) -> Self {
2711        self.shl(*rhs)
2712    }
2713}
2714
2715impl Shl<&u64> for &I64Vec3 {
2716    type Output = I64Vec3;
2717    #[inline]
2718    fn shl(self, rhs: &u64) -> I64Vec3 {
2719        (*self).shl(*rhs)
2720    }
2721}
2722
2723impl Shl<u64> for &I64Vec3 {
2724    type Output = I64Vec3;
2725    #[inline]
2726    fn shl(self, rhs: u64) -> I64Vec3 {
2727        (*self).shl(rhs)
2728    }
2729}
2730
2731impl ShlAssign<u64> for I64Vec3 {
2732    #[inline]
2733    fn shl_assign(&mut self, rhs: u64) {
2734        *self = self.shl(rhs);
2735    }
2736}
2737
2738impl ShlAssign<&u64> for I64Vec3 {
2739    #[inline]
2740    fn shl_assign(&mut self, rhs: &u64) {
2741        self.shl_assign(*rhs);
2742    }
2743}
2744
2745impl Shr<u64> for I64Vec3 {
2746    type Output = Self;
2747    #[inline]
2748    fn shr(self, rhs: u64) -> Self::Output {
2749        Self {
2750            x: self.x.shr(rhs),
2751            y: self.y.shr(rhs),
2752            z: self.z.shr(rhs),
2753        }
2754    }
2755}
2756
2757impl Shr<&u64> for I64Vec3 {
2758    type Output = Self;
2759    #[inline]
2760    fn shr(self, rhs: &u64) -> Self {
2761        self.shr(*rhs)
2762    }
2763}
2764
2765impl Shr<&u64> for &I64Vec3 {
2766    type Output = I64Vec3;
2767    #[inline]
2768    fn shr(self, rhs: &u64) -> I64Vec3 {
2769        (*self).shr(*rhs)
2770    }
2771}
2772
2773impl Shr<u64> for &I64Vec3 {
2774    type Output = I64Vec3;
2775    #[inline]
2776    fn shr(self, rhs: u64) -> I64Vec3 {
2777        (*self).shr(rhs)
2778    }
2779}
2780
2781impl ShrAssign<u64> for I64Vec3 {
2782    #[inline]
2783    fn shr_assign(&mut self, rhs: u64) {
2784        *self = self.shr(rhs);
2785    }
2786}
2787
2788impl ShrAssign<&u64> for I64Vec3 {
2789    #[inline]
2790    fn shr_assign(&mut self, rhs: &u64) {
2791        self.shr_assign(*rhs);
2792    }
2793}
2794
2795impl Shl<IVec3> for I64Vec3 {
2796    type Output = Self;
2797    #[inline]
2798    fn shl(self, rhs: IVec3) -> Self {
2799        Self {
2800            x: self.x.shl(rhs.x),
2801            y: self.y.shl(rhs.y),
2802            z: self.z.shl(rhs.z),
2803        }
2804    }
2805}
2806
2807impl Shl<&IVec3> for I64Vec3 {
2808    type Output = Self;
2809    #[inline]
2810    fn shl(self, rhs: &IVec3) -> Self {
2811        self.shl(*rhs)
2812    }
2813}
2814
2815impl Shl<&IVec3> for &I64Vec3 {
2816    type Output = I64Vec3;
2817    #[inline]
2818    fn shl(self, rhs: &IVec3) -> I64Vec3 {
2819        (*self).shl(*rhs)
2820    }
2821}
2822
2823impl Shl<IVec3> for &I64Vec3 {
2824    type Output = I64Vec3;
2825    #[inline]
2826    fn shl(self, rhs: IVec3) -> I64Vec3 {
2827        (*self).shl(rhs)
2828    }
2829}
2830
2831impl Shr<IVec3> for I64Vec3 {
2832    type Output = Self;
2833    #[inline]
2834    fn shr(self, rhs: IVec3) -> Self {
2835        Self {
2836            x: self.x.shr(rhs.x),
2837            y: self.y.shr(rhs.y),
2838            z: self.z.shr(rhs.z),
2839        }
2840    }
2841}
2842
2843impl Shr<&IVec3> for I64Vec3 {
2844    type Output = Self;
2845    #[inline]
2846    fn shr(self, rhs: &IVec3) -> Self {
2847        self.shr(*rhs)
2848    }
2849}
2850
2851impl Shr<&IVec3> for &I64Vec3 {
2852    type Output = I64Vec3;
2853    #[inline]
2854    fn shr(self, rhs: &IVec3) -> I64Vec3 {
2855        (*self).shr(*rhs)
2856    }
2857}
2858
2859impl Shr<IVec3> for &I64Vec3 {
2860    type Output = I64Vec3;
2861    #[inline]
2862    fn shr(self, rhs: IVec3) -> I64Vec3 {
2863        (*self).shr(rhs)
2864    }
2865}
2866
2867impl Shl<UVec3> for I64Vec3 {
2868    type Output = Self;
2869    #[inline]
2870    fn shl(self, rhs: UVec3) -> Self {
2871        Self {
2872            x: self.x.shl(rhs.x),
2873            y: self.y.shl(rhs.y),
2874            z: self.z.shl(rhs.z),
2875        }
2876    }
2877}
2878
2879impl Shl<&UVec3> for I64Vec3 {
2880    type Output = Self;
2881    #[inline]
2882    fn shl(self, rhs: &UVec3) -> Self {
2883        self.shl(*rhs)
2884    }
2885}
2886
2887impl Shl<&UVec3> for &I64Vec3 {
2888    type Output = I64Vec3;
2889    #[inline]
2890    fn shl(self, rhs: &UVec3) -> I64Vec3 {
2891        (*self).shl(*rhs)
2892    }
2893}
2894
2895impl Shl<UVec3> for &I64Vec3 {
2896    type Output = I64Vec3;
2897    #[inline]
2898    fn shl(self, rhs: UVec3) -> I64Vec3 {
2899        (*self).shl(rhs)
2900    }
2901}
2902
2903impl Shr<UVec3> for I64Vec3 {
2904    type Output = Self;
2905    #[inline]
2906    fn shr(self, rhs: UVec3) -> Self {
2907        Self {
2908            x: self.x.shr(rhs.x),
2909            y: self.y.shr(rhs.y),
2910            z: self.z.shr(rhs.z),
2911        }
2912    }
2913}
2914
2915impl Shr<&UVec3> for I64Vec3 {
2916    type Output = Self;
2917    #[inline]
2918    fn shr(self, rhs: &UVec3) -> Self {
2919        self.shr(*rhs)
2920    }
2921}
2922
2923impl Shr<&UVec3> for &I64Vec3 {
2924    type Output = I64Vec3;
2925    #[inline]
2926    fn shr(self, rhs: &UVec3) -> I64Vec3 {
2927        (*self).shr(*rhs)
2928    }
2929}
2930
2931impl Shr<UVec3> for &I64Vec3 {
2932    type Output = I64Vec3;
2933    #[inline]
2934    fn shr(self, rhs: UVec3) -> I64Vec3 {
2935        (*self).shr(rhs)
2936    }
2937}
2938
2939impl Index<usize> for I64Vec3 {
2940    type Output = i64;
2941    #[inline]
2942    fn index(&self, index: usize) -> &Self::Output {
2943        match index {
2944            0 => &self.x,
2945            1 => &self.y,
2946            2 => &self.z,
2947            _ => panic!("index out of bounds"),
2948        }
2949    }
2950}
2951
2952impl IndexMut<usize> for I64Vec3 {
2953    #[inline]
2954    fn index_mut(&mut self, index: usize) -> &mut Self::Output {
2955        match index {
2956            0 => &mut self.x,
2957            1 => &mut self.y,
2958            2 => &mut self.z,
2959            _ => panic!("index out of bounds"),
2960        }
2961    }
2962}
2963
2964impl fmt::Display for I64Vec3 {
2965    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2966        write!(f, "[{}, {}, {}]", self.x, self.y, self.z)
2967    }
2968}
2969
2970impl fmt::Debug for I64Vec3 {
2971    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
2972        fmt.debug_tuple(stringify!(I64Vec3))
2973            .field(&self.x)
2974            .field(&self.y)
2975            .field(&self.z)
2976            .finish()
2977    }
2978}
2979
2980impl From<[i64; 3]> for I64Vec3 {
2981    #[inline]
2982    fn from(a: [i64; 3]) -> Self {
2983        Self::new(a[0], a[1], a[2])
2984    }
2985}
2986
2987impl From<I64Vec3> for [i64; 3] {
2988    #[inline]
2989    fn from(v: I64Vec3) -> Self {
2990        [v.x, v.y, v.z]
2991    }
2992}
2993
2994impl From<(i64, i64, i64)> for I64Vec3 {
2995    #[inline]
2996    fn from(t: (i64, i64, i64)) -> Self {
2997        Self::new(t.0, t.1, t.2)
2998    }
2999}
3000
3001impl From<I64Vec3> for (i64, i64, i64) {
3002    #[inline]
3003    fn from(v: I64Vec3) -> Self {
3004        (v.x, v.y, v.z)
3005    }
3006}
3007
3008impl From<(I64Vec2, i64)> for I64Vec3 {
3009    #[inline]
3010    fn from((v, z): (I64Vec2, i64)) -> Self {
3011        Self::new(v.x, v.y, z)
3012    }
3013}
3014
3015impl From<I8Vec3> for I64Vec3 {
3016    #[inline]
3017    fn from(v: I8Vec3) -> Self {
3018        Self::new(i64::from(v.x), i64::from(v.y), i64::from(v.z))
3019    }
3020}
3021
3022impl From<U8Vec3> for I64Vec3 {
3023    #[inline]
3024    fn from(v: U8Vec3) -> Self {
3025        Self::new(i64::from(v.x), i64::from(v.y), i64::from(v.z))
3026    }
3027}
3028
3029impl From<I16Vec3> for I64Vec3 {
3030    #[inline]
3031    fn from(v: I16Vec3) -> Self {
3032        Self::new(i64::from(v.x), i64::from(v.y), i64::from(v.z))
3033    }
3034}
3035
3036impl From<U16Vec3> for I64Vec3 {
3037    #[inline]
3038    fn from(v: U16Vec3) -> Self {
3039        Self::new(i64::from(v.x), i64::from(v.y), i64::from(v.z))
3040    }
3041}
3042
3043impl From<IVec3> for I64Vec3 {
3044    #[inline]
3045    fn from(v: IVec3) -> Self {
3046        Self::new(i64::from(v.x), i64::from(v.y), i64::from(v.z))
3047    }
3048}
3049
3050impl From<UVec3> for I64Vec3 {
3051    #[inline]
3052    fn from(v: UVec3) -> Self {
3053        Self::new(i64::from(v.x), i64::from(v.y), i64::from(v.z))
3054    }
3055}
3056
3057impl TryFrom<U64Vec3> for I64Vec3 {
3058    type Error = core::num::TryFromIntError;
3059
3060    #[inline]
3061    fn try_from(v: U64Vec3) -> Result<Self, Self::Error> {
3062        Ok(Self::new(
3063            i64::try_from(v.x)?,
3064            i64::try_from(v.y)?,
3065            i64::try_from(v.z)?,
3066        ))
3067    }
3068}
3069
3070impl TryFrom<USizeVec3> for I64Vec3 {
3071    type Error = core::num::TryFromIntError;
3072
3073    #[inline]
3074    fn try_from(v: USizeVec3) -> Result<Self, Self::Error> {
3075        Ok(Self::new(
3076            i64::try_from(v.x)?,
3077            i64::try_from(v.y)?,
3078            i64::try_from(v.z)?,
3079        ))
3080    }
3081}
3082
3083impl From<BVec3> for I64Vec3 {
3084    #[inline]
3085    fn from(v: BVec3) -> Self {
3086        Self::new(i64::from(v.x), i64::from(v.y), i64::from(v.z))
3087    }
3088}
3089
3090impl From<BVec3A> for I64Vec3 {
3091    #[inline]
3092    fn from(v: BVec3A) -> Self {
3093        let bool_array: [bool; 3] = v.into();
3094        Self::new(
3095            i64::from(bool_array[0]),
3096            i64::from(bool_array[1]),
3097            i64::from(bool_array[2]),
3098        )
3099    }
3100}