Debian Codegraph @

debian/missing-sources/glam-0.28.0/src/f64/dvec3.rs

raw symbols SCIP
1 // Generated from vec.rs.tera template. Edit the template, not the generated file.
2
3 use craterust-analyzer cargo glam 0.28.0 crate/::{f64rust-analyzer cargo glam 0.28.0 f64/::mathrust-analyzer cargo glam 0.28.0 f64/math/, BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#, BVec3Arust-analyzer cargo glam 0.28.0 bool/sse2/bvec3a/BVec3A#, DVec2rust-analyzer cargo glam 0.28.0 f64/dvec2/DVec2#, DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#, IVec3rust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3#, UVec3rust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3#, Vec3rust-analyzer cargo glam 0.28.0 f32/vec3/Vec3#};
4
5 #[cfg(not(target_arch = "spirv"))]
6 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/;
7 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::{Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#, Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#};
8 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::{f32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/, opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::*};
9
10 /// Creates a 3-dimensional vector.
11 #[inline(always)]
12 #[must_use]
13 pub const fn dvec3rust-analyzer cargo glam 0.28.0 f64/dvec3/dvec3().(x: f64, y: f64, z: f64) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
14 DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(x, y, z)
15 }
16
17 /// A 3-dimensional vector.
18 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
19 #[cfg_attr(not(target_arch = "spirv"), repr(C))]
20 #[cfg_attr(target_arch = "spirv", repr(simd))]
21 pub struct DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
22 pub xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: f64,
23 pub yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: f64,
24 pub zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: f64,
25 }
26
27 impl DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
28 /// All zeroes.
29 pub const ZEROrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ZERO.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(0.0);
30
31 /// All ones.
32 pub const ONErust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ONE.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(1.0);
33
34 /// All negative ones.
35 pub const NEG_ONErust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]NEG_ONE.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0);
36
37 /// All `f64::MIN`.
38 pub const MINrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]MIN.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(f64::MINrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]MIN.);
39
40 /// All `f64::MAX`.
41 pub const MAXrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]MAX.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(f64::MAXrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]MAX.);
42
43 /// All `f64::NAN`.
44 pub const NANrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]NAN.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(f64::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NAN.);
45
46 /// All `f64::INFINITY`.
47 pub const INFINITYrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]INFINITY.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(f64::INFINITYrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]INFINITY.);
48
49 /// All `f64::NEG_INFINITY`.
50 pub const NEG_INFINITYrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]NEG_INFINITY.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(f64::NEG_INFINITYrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]NEG_INFINITY.);
51
52 /// A unit vector pointing along the positive X axis.
53 pub const Xrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]X.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(1.0, 0.0, 0.0);
54
55 /// A unit vector pointing along the positive Y axis.
56 pub const Yrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]Y.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(0.0, 1.0, 0.0);
57
58 /// A unit vector pointing along the positive Z axis.
59 pub const Zrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]Z.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(0.0, 0.0, 1.0);
60
61 /// A unit vector pointing along the negative X axis.
62 pub const NEG_Xrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]NEG_X.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0, 0.0, 0.0);
63
64 /// A unit vector pointing along the negative Y axis.
65 pub const NEG_Yrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]NEG_Y.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0, 0.0);
66
67 /// A unit vector pointing along the negative Z axis.
68 pub const NEG_Zrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]NEG_Z.: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(0.0, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0);
69
70 /// The unit axes.
71 pub const AXESrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]AXES.: [Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]; 3] = [Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::Xrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]X., Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::Yrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]Y., Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::Zrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]Z.];
72
73 /// Creates a new vector.
74 #[inline(always)]
75 #[must_use]
76 pub const fn newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(x: f64, y: f64, z: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
77 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] { xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. }
78 }
79
80 /// Creates a vector with all elements set to `v`.
81 #[inline]
82 #[must_use]
83 pub const fn splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(v: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
84 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] { xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: v, yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: v, zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: v }
85 }
86
87 /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use
88 /// for each element of `self`.
89 ///
90 /// A true element in the mask uses the corresponding element from `if_true`, and false
91 /// uses the element from `if_false`.
92 #[inline]
93 #[must_use]
94 pub fn selectrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]select().(mask: BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#, if_true: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3], if_false: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
95 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
96 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: if mask.testrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]test().(0) { if_true.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. } else { if_false.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. },
97 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: if mask.testrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]test().(1) { if_true.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. } else { if_false.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. },
98 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: if mask.testrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]test().(2) { if_true.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. } else { if_false.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. },
99 }
100 }
101
102 /// Creates a new vector from an array.
103 #[inline]
104 #[must_use]
105 pub const fn from_arrayrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]from_array().(a: [f64; 3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
106 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(a[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., a[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., a[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().)
107 }
108
109 /// `[x, y, z]`
110 #[inline]
111 #[must_use]
112 pub const fn to_arrayrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]to_array().(&self) -> [f64; 3] {
113 [self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.]
114 }
115
116 /// Creates a vector from the first 3 values in `slice`.
117 ///
118 /// # Panics
119 ///
120 /// Panics if `slice` is less than 3 elements long.
121 #[inline]
122 #[must_use]
123 pub const fn from_slicerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]from_slice().(slice: &[f64]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
124 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()., slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)
125 }
126
127 /// Writes the elements of `self` to the first 3 elements in `slice`.
128 ///
129 /// # Panics
130 ///
131 /// Panics if `slice` is less than 3 elements long.
132 #[inline]
133 pub fn write_to_slicerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]write_to_slice().(self, slice: &mut [f64]) {
134 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.;
135 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.;
136 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.;
137 }
138
139 /// Internal method for creating a 3D vector from a 4D vector, discarding `w`.
140 #[allow(dead_code)]
141 #[inline]
142 #[must_use]
143 pub(craterust-analyzer cargo glam 0.28.0 crate/) fn from_vec4rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]from_vec4().(v: DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
144 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
145 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: v.xrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#x.,
146 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: v.yrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#y.,
147 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: v.zrust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#z.,
148 }
149 }
150
151 /// Creates a 4D vector from `self` and the given `w` value.
152 #[inline]
153 #[must_use]
154 pub fn extendrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]extend().(self, w: f64) -> DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4# {
155 DVec4rust-analyzer cargo glam 0.28.0 f64/dvec4/DVec4#::newrust-analyzer cargo glam 0.28.0 f64/dvec4/impl#[DVec4]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., w)
156 }
157
158 /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.
159 ///
160 /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].
161 #[inline]
162 #[must_use]
163 pub fn truncaterust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]truncate().(self) -> DVec2rust-analyzer cargo glam 0.28.0 f64/dvec2/DVec2# {
164 use craterust-analyzer cargo glam 0.28.0 crate/::swizzlesrust-analyzer cargo glam 0.28.0 swizzles/::Vec3Swizzlesrust-analyzer cargo glam 0.28.0 swizzles/vec_traits/Vec3Swizzles#;
165 self.xyrust-analyzer cargo glam 0.28.0 swizzles/dvec3_impl/impl#[DVec3][Vec3Swizzles]xy().()
166 }
167
168 /// Creates a 3D vector from `self` with the given value of `x`.
169 #[inline]
170 #[must_use]
171 pub fn with_xrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]with_x().(mut self, x: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
172 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. = x;
173 self
174 }
175
176 /// Creates a 3D vector from `self` with the given value of `y`.
177 #[inline]
178 #[must_use]
179 pub fn with_yrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]with_y().(mut self, y: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
180 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. = y;
181 self
182 }
183
184 /// Creates a 3D vector from `self` with the given value of `z`.
185 #[inline]
186 #[must_use]
187 pub fn with_zrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]with_z().(mut self, z: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
188 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. = z;
189 self
190 }
191
192 /// Computes the dot product of `self` and `rhs`.
193 #[inline]
194 #[must_use]
195 pub fn dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> f64 {
196 (self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.)
197 }
198
199 /// Returns a vector where every component is the dot product of `self` and `rhs`.
200 #[inline]
201 #[must_use]
202 pub fn dot_into_vecrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot_into_vec().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
203 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(self.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(rhs))
204 }
205
206 /// Computes the cross product of `self` and `rhs`.
207 #[inline]
208 #[must_use]
209 pub fn crossrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cross().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
210 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
211 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.,
212 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.,
213 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.,
214 }
215 }
216
217 /// Returns a vector containing the minimum values for each element of `self` and `rhs`.
218 ///
219 /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.
220 #[inline]
221 #[must_use]
222 pub fn minrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]min().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
223 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
224 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
225 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
226 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
227 }
228 }
229
230 /// Returns a vector containing the maximum values for each element of `self` and `rhs`.
231 ///
232 /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.
233 #[inline]
234 #[must_use]
235 pub fn maxrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]max().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
236 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
237 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
238 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
239 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
240 }
241 }
242
243 /// Component-wise clamping of values, similar to [`f64::clamp`].
244 ///
245 /// Each element in `min` must be less-or-equal to the corresponding element in `max`.
246 ///
247 /// # Panics
248 ///
249 /// Will panic if `min` is greater than `max` when `glam_assert` is enabled.
250 #[inline]
251 #[must_use]
252 pub fn clamprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]clamp().(self, min: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3], max: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
253 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(min.cmple(max).all(), "clamp: expected min <= max");
254 self.maxrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]max().(min).minrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]min().(max)
255 }
256
257 /// Returns the horizontal minimum of `self`.
258 ///
259 /// In other words this computes `min(x, y, ..)`.
260 #[inline]
261 #[must_use]
262 pub fn min_elementrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]min_element().(self) -> f64 {
263 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..minrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]min().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
264 }
265
266 /// Returns the horizontal maximum of `self`.
267 ///
268 /// In other words this computes `max(x, y, ..)`.
269 #[inline]
270 #[must_use]
271 pub fn max_elementrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]max_element().(self) -> f64 {
272 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]max().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
273 }
274
275 /// Returns the sum of all elements of `self`.
276 ///
277 /// In other words, this computes `self.x + self.y + ..`.
278 #[inline]
279 #[must_use]
280 pub fn element_sumrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]element_sum().(self) -> f64 {
281 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.
282 }
283
284 /// Returns the product of all elements of `self`.
285 ///
286 /// In other words, this computes `self.x * self.y * ..`.
287 #[inline]
288 #[must_use]
289 pub fn element_productrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]element_product().(self) -> f64 {
290 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.
291 }
292
293 /// Returns a vector mask containing the result of a `==` comparison for each element of
294 /// `self` and `rhs`.
295 ///
296 /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all
297 /// elements.
298 #[inline]
299 #[must_use]
300 pub fn cmpeqrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cmpeq().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3# {
301 BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#::newrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().(&rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().(&rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]eq().(&rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
302 }
303
304 /// Returns a vector mask containing the result of a `!=` comparison for each element of
305 /// `self` and `rhs`.
306 ///
307 /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all
308 /// elements.
309 #[inline]
310 #[must_use]
311 pub fn cmpnerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cmpne().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3# {
312 BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#::newrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().(&rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().(&rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..nerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialEq<Self>`]ne().(&rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
313 }
314
315 /// Returns a vector mask containing the result of a `>=` comparison for each element of
316 /// `self` and `rhs`.
317 ///
318 /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all
319 /// elements.
320 #[inline]
321 #[must_use]
322 pub fn cmpgerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cmpge().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3# {
323 BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#::newrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..gerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]ge().(&rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..gerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]ge().(&rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..gerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]ge().(&rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
324 }
325
326 /// Returns a vector mask containing the result of a `>` comparison for each element of
327 /// `self` and `rhs`.
328 ///
329 /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all
330 /// elements.
331 #[inline]
332 #[must_use]
333 pub fn cmpgtrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cmpgt().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3# {
334 BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#::newrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..gtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().(&rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..gtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().(&rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..gtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().(&rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
335 }
336
337 /// Returns a vector mask containing the result of a `<=` comparison for each element of
338 /// `self` and `rhs`.
339 ///
340 /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all
341 /// elements.
342 #[inline]
343 #[must_use]
344 pub fn cmplerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cmple().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3# {
345 BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#::newrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..lerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().(&rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..lerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().(&rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..lerust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().(&rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
346 }
347
348 /// Returns a vector mask containing the result of a `<` comparison for each element of
349 /// `self` and `rhs`.
350 ///
351 /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all
352 /// elements.
353 #[inline]
354 #[must_use]
355 pub fn cmpltrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cmplt().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3# {
356 BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#::newrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..ltrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().(&rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..ltrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().(&rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..ltrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().(&rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
357 }
358
359 /// Returns a vector containing the absolute value of each element of `self`.
360 #[inline]
361 #[must_use]
362 pub fn absrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]abs().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
363 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
364 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: mathrust-analyzer cargo glam 0.28.0 f64/math/::absrust-analyzer cargo glam 0.28.0 f64/math/std_math/abs().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
365 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: mathrust-analyzer cargo glam 0.28.0 f64/math/::absrust-analyzer cargo glam 0.28.0 f64/math/std_math/abs().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
366 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: mathrust-analyzer cargo glam 0.28.0 f64/math/::absrust-analyzer cargo glam 0.28.0 f64/math/std_math/abs().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
367 }
368 }
369
370 /// Returns a vector with elements representing the sign of `self`.
371 ///
372 /// - `1.0` if the number is positive, `+0.0` or `INFINITY`
373 /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
374 /// - `NAN` if the number is `NAN`
375 #[inline]
376 #[must_use]
377 pub fn signumrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]signum().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
378 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
379 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: mathrust-analyzer cargo glam 0.28.0 f64/math/::signumrust-analyzer cargo glam 0.28.0 f64/math/std_math/signum().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
380 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: mathrust-analyzer cargo glam 0.28.0 f64/math/::signumrust-analyzer cargo glam 0.28.0 f64/math/std_math/signum().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
381 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: mathrust-analyzer cargo glam 0.28.0 f64/math/::signumrust-analyzer cargo glam 0.28.0 f64/math/std_math/signum().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
382 }
383 }
384
385 /// Returns a vector with signs of `rhs` and the magnitudes of `self`.
386 #[inline]
387 #[must_use]
388 pub fn copysignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]copysign().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
389 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
390 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: mathrust-analyzer cargo glam 0.28.0 f64/math/::copysignrust-analyzer cargo glam 0.28.0 f64/math/std_math/copysign().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
391 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: mathrust-analyzer cargo glam 0.28.0 f64/math/::copysignrust-analyzer cargo glam 0.28.0 f64/math/std_math/copysign().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
392 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: mathrust-analyzer cargo glam 0.28.0 f64/math/::copysignrust-analyzer cargo glam 0.28.0 f64/math/std_math/copysign().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
393 }
394 }
395
396 /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.
397 ///
398 /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes
399 /// into the first lowest bit, element `y` into the second, etc.
400 #[inline]
401 #[must_use]
402 pub fn is_negative_bitmaskrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]is_negative_bitmask().(self) -> u32 {
403 (self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..is_sign_negativerust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_sign_negative().() as u32)
404 |rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..is_sign_negativerust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_sign_negative().() as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().1
405 |rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`BitOr<Self>`]bitor().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..is_sign_negativerust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_sign_negative().() as u32) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().<<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u32][`Shl<i32>`]shl().2
406 }
407
408 /// Returns `true` if, and only if, all elements are finite. If any element is either
409 /// `NaN`, positive or negative infinity, this will return `false`.
410 #[inline]
411 #[must_use]
412 pub fn is_finiterust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]is_finite().(self) -> bool {
413 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..is_finiterust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_finite().() && self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..is_finiterust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_finite().() && self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..is_finiterust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_finite().()
414 }
415
416 /// Returns `true` if any elements are `NaN`.
417 #[inline]
418 #[must_use]
419 pub fn is_nanrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]is_nan().(self) -> bool {
420 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() || self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().() || self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().()
421 }
422
423 /// Performs `is_nan` on each element of self, returning a vector mask of the results.
424 ///
425 /// In other words, this computes `[x.is_nan(), y.is_nan(), z.is_nan(), w.is_nan()]`.
426 #[inline]
427 #[must_use]
428 pub fn is_nan_maskrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]is_nan_mask().(self) -> BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3# {
429 BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#::newrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().(), self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().(), self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..is_nanrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_nan().())
430 }
431
432 /// Computes the length of `self`.
433 #[doc(alias = "magnitude")]
434 #[inline]
435 #[must_use]
436 pub fn lengthrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length().(self) -> f64 {
437 mathrust-analyzer cargo glam 0.28.0 f64/math/::sqrtrust-analyzer cargo glam 0.28.0 f64/math/std_math/sqrt().(self.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(self))
438 }
439
440 /// Computes the squared length of `self`.
441 ///
442 /// This is faster than `length()` as it avoids a square root operation.
443 #[doc(alias = "magnitude2")]
444 #[inline]
445 #[must_use]
446 pub fn length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().(self) -> f64 {
447 self.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(self)
448 }
449
450 /// Computes `1.0 / length()`.
451 ///
452 /// For valid results, `self` must _not_ be of length zero.
453 #[inline]
454 #[must_use]
455 pub fn length_reciprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_recip().(self) -> f64 {
456 self.lengthrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length().().reciprust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]recip().()
457 }
458
459 /// Computes the Euclidean distance between two points in space.
460 #[inline]
461 #[must_use]
462 pub fn distancerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]distance().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> f64 {
463 (self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().rhs).lengthrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length().()
464 }
465
466 /// Compute the squared euclidean distance between two points in space.
467 #[inline]
468 #[must_use]
469 pub fn distance_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]distance_squared().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> f64 {
470 (self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().rhs).length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().()
471 }
472
473 /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.
474 #[inline]
475 #[must_use]
476 pub fn div_euclidrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]div_euclid().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
477 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(
478 mathrust-analyzer cargo glam 0.28.0 f64/math/::div_euclidrust-analyzer cargo glam 0.28.0 f64/math/std_math/div_euclid().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
479 mathrust-analyzer cargo glam 0.28.0 f64/math/::div_euclidrust-analyzer cargo glam 0.28.0 f64/math/std_math/div_euclid().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
480 mathrust-analyzer cargo glam 0.28.0 f64/math/::div_euclidrust-analyzer cargo glam 0.28.0 f64/math/std_math/div_euclid().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
481 )
482 }
483
484 /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.
485 ///
486 /// [Euclidean division]: f64::rem_euclid
487 #[inline]
488 #[must_use]
489 pub fn rem_euclidrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]rem_euclid().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
490 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(
491 mathrust-analyzer cargo glam 0.28.0 f64/math/::rem_euclidrust-analyzer cargo glam 0.28.0 f64/math/std_math/rem_euclid().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
492 mathrust-analyzer cargo glam 0.28.0 f64/math/::rem_euclidrust-analyzer cargo glam 0.28.0 f64/math/std_math/rem_euclid().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
493 mathrust-analyzer cargo glam 0.28.0 f64/math/::rem_euclidrust-analyzer cargo glam 0.28.0 f64/math/std_math/rem_euclid().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
494 )
495 }
496
497 /// Returns `self` normalized to length 1.0.
498 ///
499 /// For valid results, `self` must _not_ be of length zero, nor very close to zero.
500 ///
501 /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].
502 ///
503 /// Panics
504 ///
505 /// Will panic if `self` is zero length when `glam_assert` is enabled.
506 #[inline]
507 #[must_use]
508 pub fn normalizerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]normalize().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
509 #[allow(clippy::let_and_return)]
510 let normalized = self.mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().(self.length_reciprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_recip().());
511 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(normalized.is_finite());
512 normalized
513 }
514
515 /// Returns `self` normalized to length 1.0 if possible, else returns `None`.
516 ///
517 /// In particular, if the input is zero (or very close to zero), or non-finite,
518 /// the result of this operation will be `None`.
519 ///
520 /// See also [`Self::normalize_or_zero()`].
521 #[inline]
522 #[must_use]
523 pub fn try_normalizerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]try_normalize().(self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]> {
524 let rcp = self.length_reciprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_recip().();
525 if rcp.is_finiterust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_finite().() && rcp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().0.0 {
526 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().rcp)
527 } else {
528 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
529 }
530 }
531
532 /// Returns `self` normalized to length 1.0 if possible, else returns a
533 /// fallback value.
534 ///
535 /// In particular, if the input is zero (or very close to zero), or non-finite,
536 /// the result of this operation will be the fallback value.
537 ///
538 /// See also [`Self::try_normalize()`].
539 #[inline]
540 #[must_use]
541 pub fn normalize_orrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]normalize_or().(self, fallback: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
542 let rcp = self.length_reciprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_recip().();
543 if rcp.is_finiterust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]is_finite().() && rcp rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().0.0 {
544 self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().rcp
545 } else {
546 fallback
547 }
548 }
549
550 /// Returns `self` normalized to length 1.0 if possible, else returns zero.
551 ///
552 /// In particular, if the input is zero (or very close to zero), or non-finite,
553 /// the result of this operation will be zero.
554 ///
555 /// See also [`Self::try_normalize()`].
556 #[inline]
557 #[must_use]
558 pub fn normalize_or_zerorust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]normalize_or_zero().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
559 self.normalize_orrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]normalize_or().(Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ZERO.)
560 }
561
562 /// Returns whether `self` is length `1.0` or not.
563 ///
564 /// Uses a precision threshold of approximately `1e-4`.
565 #[inline]
566 #[must_use]
567 pub fn is_normalizedrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]is_normalized().(self) -> bool {
568 mathrust-analyzer cargo glam 0.28.0 f64/math/::absrust-analyzer cargo glam 0.28.0 f64/math/std_math/abs().(self.length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().1.0) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().2e-4
569 }
570
571 /// Returns the vector projection of `self` onto `rhs`.
572 ///
573 /// `rhs` must be of non-zero length.
574 ///
575 /// # Panics
576 ///
577 /// Will panic if `rhs` is zero length when `glam_assert` is enabled.
578 #[inline]
579 #[must_use]
580 pub fn project_ontorust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]project_onto().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
581 let other_len_sq_rcp = rhs.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(rhs).reciprust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]recip().();
582 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(other_len_sq_rcp.is_finite());
583 rhs rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().self.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(rhs) rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().other_len_sq_rcp
584 }
585
586 /// Returns the vector rejection of `self` from `rhs`.
587 ///
588 /// The vector rejection is the vector perpendicular to the projection of `self` onto
589 /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.
590 ///
591 /// `rhs` must be of non-zero length.
592 ///
593 /// # Panics
594 ///
595 /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled.
596 #[inline]
597 #[must_use]
598 pub fn reject_fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]reject_from().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
599 self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().self.project_ontorust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]project_onto().(rhs)
600 }
601
602 /// Returns the vector projection of `self` onto `rhs`.
603 ///
604 /// `rhs` must be normalized.
605 ///
606 /// # Panics
607 ///
608 /// Will panic if `rhs` is not normalized when `glam_assert` is enabled.
609 #[inline]
610 #[must_use]
611 pub fn project_onto_normalizedrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]project_onto_normalized().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
612 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(rhs.is_normalized());
613 rhs rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().self.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(rhs)
614 }
615
616 /// Returns the vector rejection of `self` from `rhs`.
617 ///
618 /// The vector rejection is the vector perpendicular to the projection of `self` onto
619 /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.
620 ///
621 /// `rhs` must be normalized.
622 ///
623 /// # Panics
624 ///
625 /// Will panic if `rhs` is not normalized when `glam_assert` is enabled.
626 #[inline]
627 #[must_use]
628 pub fn reject_from_normalizedrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]reject_from_normalized().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
629 self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().self.project_onto_normalizedrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]project_onto_normalized().(rhs)
630 }
631
632 /// Returns a vector containing the nearest integer to a number for each element of `self`.
633 /// Round half-way cases away from 0.0.
634 #[inline]
635 #[must_use]
636 pub fn roundrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]round().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
637 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
638 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: mathrust-analyzer cargo glam 0.28.0 f64/math/::roundrust-analyzer cargo glam 0.28.0 f64/math/std_math/round().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
639 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: mathrust-analyzer cargo glam 0.28.0 f64/math/::roundrust-analyzer cargo glam 0.28.0 f64/math/std_math/round().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
640 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: mathrust-analyzer cargo glam 0.28.0 f64/math/::roundrust-analyzer cargo glam 0.28.0 f64/math/std_math/round().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
641 }
642 }
643
644 /// Returns a vector containing the largest integer less than or equal to a number for each
645 /// element of `self`.
646 #[inline]
647 #[must_use]
648 pub fn floorrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]floor().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
649 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
650 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: mathrust-analyzer cargo glam 0.28.0 f64/math/::floorrust-analyzer cargo glam 0.28.0 f64/math/std_math/floor().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
651 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: mathrust-analyzer cargo glam 0.28.0 f64/math/::floorrust-analyzer cargo glam 0.28.0 f64/math/std_math/floor().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
652 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: mathrust-analyzer cargo glam 0.28.0 f64/math/::floorrust-analyzer cargo glam 0.28.0 f64/math/std_math/floor().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
653 }
654 }
655
656 /// Returns a vector containing the smallest integer greater than or equal to a number for
657 /// each element of `self`.
658 #[inline]
659 #[must_use]
660 pub fn ceilrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ceil().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
661 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
662 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: mathrust-analyzer cargo glam 0.28.0 f64/math/::ceilrust-analyzer cargo glam 0.28.0 f64/math/std_math/ceil().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
663 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: mathrust-analyzer cargo glam 0.28.0 f64/math/::ceilrust-analyzer cargo glam 0.28.0 f64/math/std_math/ceil().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
664 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: mathrust-analyzer cargo glam 0.28.0 f64/math/::ceilrust-analyzer cargo glam 0.28.0 f64/math/std_math/ceil().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
665 }
666 }
667
668 /// Returns a vector containing the integer part each element of `self`. This means numbers are
669 /// always truncated towards zero.
670 #[inline]
671 #[must_use]
672 pub fn truncrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]trunc().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
673 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
674 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: mathrust-analyzer cargo glam 0.28.0 f64/math/::truncrust-analyzer cargo glam 0.28.0 f64/math/std_math/trunc().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
675 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: mathrust-analyzer cargo glam 0.28.0 f64/math/::truncrust-analyzer cargo glam 0.28.0 f64/math/std_math/trunc().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
676 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: mathrust-analyzer cargo glam 0.28.0 f64/math/::truncrust-analyzer cargo glam 0.28.0 f64/math/std_math/trunc().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
677 }
678 }
679
680 /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`.
681 ///
682 /// Note that this differs from the GLSL implementation of `fract` which returns
683 /// `self - self.floor()`.
684 ///
685 /// Note that this is fast but not precise for large numbers.
686 #[inline]
687 #[must_use]
688 pub fn fractrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]fract().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
689 self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().self.truncrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]trunc().()
690 }
691
692 /// Returns a vector containing the fractional part of the vector as `self - self.floor()`.
693 ///
694 /// Note that this differs from the Rust implementation of `fract` which returns
695 /// `self - self.trunc()`.
696 ///
697 /// Note that this is fast but not precise for large numbers.
698 #[inline]
699 #[must_use]
700 pub fn fract_glrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]fract_gl().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
701 self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().self.floorrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]floor().()
702 }
703
704 /// Returns a vector containing `e^self` (the exponential function) for each element of
705 /// `self`.
706 #[inline]
707 #[must_use]
708 pub fn exprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]exp().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
709 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(mathrust-analyzer cargo glam 0.28.0 f64/math/::exprust-analyzer cargo glam 0.28.0 f64/math/std_math/exp().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.), mathrust-analyzer cargo glam 0.28.0 f64/math/::exprust-analyzer cargo glam 0.28.0 f64/math/std_math/exp().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.), mathrust-analyzer cargo glam 0.28.0 f64/math/::exprust-analyzer cargo glam 0.28.0 f64/math/std_math/exp().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.))
710 }
711
712 /// Returns a vector containing each element of `self` raised to the power of `n`.
713 #[inline]
714 #[must_use]
715 pub fn powfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]powf().(self, n: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
716 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(
717 mathrust-analyzer cargo glam 0.28.0 f64/math/::powfrust-analyzer cargo glam 0.28.0 f64/math/std_math/powf().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., n),
718 mathrust-analyzer cargo glam 0.28.0 f64/math/::powfrust-analyzer cargo glam 0.28.0 f64/math/std_math/powf().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., n),
719 mathrust-analyzer cargo glam 0.28.0 f64/math/::powfrust-analyzer cargo glam 0.28.0 f64/math/std_math/powf().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., n),
720 )
721 }
722
723 /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`.
724 #[inline]
725 #[must_use]
726 pub fn reciprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]recip().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
727 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
728 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.,
729 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.,
730 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: 1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.,
731 }
732 }
733
734 /// Performs a linear interpolation between `self` and `rhs` based on the value `s`.
735 ///
736 /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result
737 /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly
738 /// extrapolated.
739 #[doc(alias = "mix")]
740 #[inline]
741 #[must_use]
742 pub fn lerprust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]lerp().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3], s: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
743 self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().+rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().((rhs rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().self) rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().s)
744 }
745
746 /// Moves towards `rhs` based on the value `d`.
747 ///
748 /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to
749 /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.
750 #[inline]
751 #[must_use]
752 pub fn move_towardsrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]move_towards().(&self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3], d: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
753 let a = rhs rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().-rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self;
754 let len = a.lengthrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length().();
755 if len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().d || len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]le().1e-4 {
756 return rhs;
757 }
758 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().+rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().a rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div()./rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div().len rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().d
759 }
760
761 /// Calculates the midpoint between `self` and `rhs`.
762 ///
763 /// The midpoint is the average of, or halfway point between, two vectors.
764 /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`
765 /// while being slightly cheaper to compute.
766 #[inline]
767 pub fn midpointrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]midpoint().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
768 (self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().+rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().rhs) rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().0.5
769 }
770
771 /// Returns true if the absolute difference of all elements between `self` and `rhs` is
772 /// less than or equal to `max_abs_diff`.
773 ///
774 /// This can be used to compare if two vectors contain similar elements. It works best when
775 /// comparing with a known value. The `max_abs_diff` that should be used used depends on
776 /// the values being compared against.
777 ///
778 /// For more see
779 /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).
780 #[inline]
781 #[must_use]
782 pub fn abs_diff_eqrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]abs_diff_eq().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3], max_abs_diff: f64) -> bool {
783 self.subrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().(rhs).absrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]abs().().cmplerust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]cmple().(Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::splatrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]splat().(max_abs_diff)).allrust-analyzer cargo glam 0.28.0 bool/bvec3/impl#[BVec3]all().()
784 }
785
786 /// Returns a vector with a length no less than `min` and no more than `max`.
787 ///
788 /// # Panics
789 ///
790 /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.
791 #[inline]
792 #[must_use]
793 pub fn clamp_lengthrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]clamp_length().(self, min: f64, max: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
794 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(0.0 <= min);
795 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(min <= max);
796 let length_sq = self.length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().();
797 if length_sq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().min rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().min {
798 min rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().(self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div()./rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div().mathrust-analyzer cargo glam 0.28.0 f64/math/::sqrtrust-analyzer cargo glam 0.28.0 f64/math/std_math/sqrt().(length_sq))
799 } else if length_sq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().max {
800 max rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().(self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div()./rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div().mathrust-analyzer cargo glam 0.28.0 f64/math/::sqrtrust-analyzer cargo glam 0.28.0 f64/math/std_math/sqrt().(length_sq))
801 } else {
802 self
803 }
804 }
805
806 /// Returns a vector with a length no more than `max`.
807 ///
808 /// # Panics
809 ///
810 /// Will panic if `max` is negative when `glam_assert` is enabled.
811 #[inline]
812 #[must_use]
813 pub fn clamp_length_maxrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]clamp_length_max().(self, max: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
814 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(0.0 <= max);
815 let length_sq = self.length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().();
816 if length_sq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().max rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().max {
817 max rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().(self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div()./rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div().mathrust-analyzer cargo glam 0.28.0 f64/math/::sqrtrust-analyzer cargo glam 0.28.0 f64/math/std_math/sqrt().(length_sq))
818 } else {
819 self
820 }
821 }
822
823 /// Returns a vector with a length no less than `min`.
824 ///
825 /// # Panics
826 ///
827 /// Will panic if `min` is negative when `glam_assert` is enabled.
828 #[inline]
829 #[must_use]
830 pub fn clamp_length_minrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]clamp_length_min().(self, min: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
831 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(0.0 <= min);
832 let length_sq = self.length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().();
833 if length_sq rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]lt().min rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().min {
834 min rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().*rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().(self rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div()./rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div(). rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div().mathrust-analyzer cargo glam 0.28.0 f64/math/::sqrtrust-analyzer cargo glam 0.28.0 f64/math/std_math/sqrt().(length_sq))
835 } else {
836 self
837 }
838 }
839
840 /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding
841 /// error, yielding a more accurate result than an unfused multiply-add.
842 ///
843 /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target
844 /// architecture has a dedicated fma CPU instruction. However, this is not always true,
845 /// and will be heavily dependant on designing algorithms with specific target hardware in
846 /// mind.
847 #[inline]
848 #[must_use]
849 pub fn mul_addrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]mul_add().(self, a: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3], b: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
850 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(
851 mathrust-analyzer cargo glam 0.28.0 f64/math/::mul_addrust-analyzer cargo glam 0.28.0 f64/math/std_math/mul_add().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., a.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., b.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
852 mathrust-analyzer cargo glam 0.28.0 f64/math/::mul_addrust-analyzer cargo glam 0.28.0 f64/math/std_math/mul_add().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., a.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., b.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
853 mathrust-analyzer cargo glam 0.28.0 f64/math/::mul_addrust-analyzer cargo glam 0.28.0 f64/math/std_math/mul_add().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., a.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., b.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
854 )
855 }
856
857 /// Returns the angle (in radians) between two vectors in the range `[0, +Ï€]`.
858 ///
859 /// The inputs do not need to be unit vectors however they must be non-zero.
860 #[inline]
861 #[must_use]
862 pub fn angle_betweenrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]angle_between().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) -> f64 {
863 mathrust-analyzer cargo glam 0.28.0 f64/math/::acos_approxrust-analyzer cargo glam 0.28.0 f64/math/std_math/acos_approx().(
864 self.dotrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]dot().(rhs)
865 .divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(mathrust-analyzer cargo glam 0.28.0 f64/math/::sqrtrust-analyzer cargo glam 0.28.0 f64/math/std_math/sqrt().(self.length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().().mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs.length_squaredrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]length_squared().()))),
866 )
867 }
868
869 /// Returns some vector that is orthogonal to the given one.
870 ///
871 /// The input vector must be finite and non-zero.
872 ///
873 /// The output vector is not necessarily unit length. For that use
874 /// [`Self::any_orthonormal_vector()`] instead.
875 #[inline]
876 #[must_use]
877 pub fn any_orthogonal_vectorrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]any_orthogonal_vector().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
878 // This can probably be optimized
879 if mathrust-analyzer cargo glam 0.28.0 f64/math/::absrust-analyzer cargo glam 0.28.0 f64/math/std_math/abs().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[f64][`PartialOrd<Self>`]gt().mathrust-analyzer cargo glam 0.28.0 f64/math/::absrust-analyzer cargo glam 0.28.0 f64/math/std_math/abs().(self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.) {
880 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., 0.0, self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.) // self.cross(Self::Y)
881 } else {
882 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(0.0, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.) // self.cross(Self::X)
883 }
884 }
885
886 /// Returns any unit vector that is orthogonal to the given one.
887 ///
888 /// The input vector must be unit length.
889 ///
890 /// # Panics
891 ///
892 /// Will panic if `self` is not normalized when `glam_assert` is enabled.
893 #[inline]
894 #[must_use]
895 pub fn any_orthonormal_vectorrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]any_orthonormal_vector().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3] {
896 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(self.is_normalized());
897 // From https://graphics.pixar.com/library/OrthonormalB/paper.pdf
898 let sign = mathrust-analyzer cargo glam 0.28.0 f64/math/::signumrust-analyzer cargo glam 0.28.0 f64/math/std_math/signum().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
899 let a = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(sign rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
900 let b = self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a;
901 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(b, sign rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.)
902 }
903
904 /// Given a unit vector return two other vectors that together form an orthonormal
905 /// basis. That is, all three vectors are orthogonal to each other and are normalized.
906 ///
907 /// # Panics
908 ///
909 /// Will panic if `self` is not normalized when `glam_assert` is enabled.
910 #[inline]
911 #[must_use]
912 pub fn any_orthonormal_pairrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]any_orthonormal_pair().(&self) -> (Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3], Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]) {
913 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(self.is_normalized());
914 // From https://graphics.pixar.com/library/OrthonormalB/paper.pdf
915 let sign = mathrust-analyzer cargo glam 0.28.0 f64/math/::signumrust-analyzer cargo glam 0.28.0 f64/math/std_math/signum().(self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
916 let a = -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(sign rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
917 let b = self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a;
918 (
919 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(1.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().sign rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a, sign rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().b, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().sign rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
920 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(b, sign rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().a, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
921 )
922 }
923
924 /// Casts all elements of `self` to `f32`.
925 #[inline]
926 #[must_use]
927 pub fn as_vec3rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_vec3().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::Vec3rust-analyzer cargo glam 0.28.0 f32/vec3/Vec3# {
928 craterust-analyzer cargo glam 0.28.0 crate/::Vec3rust-analyzer cargo glam 0.28.0 f32/vec3/Vec3#::newrust-analyzer cargo glam 0.28.0 f32/vec3/impl#[Vec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as f32, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as f32, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as f32)
929 }
930
931 /// Casts all elements of `self` to `f32`.
932 #[inline]
933 #[must_use]
934 pub fn as_vec3arust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_vec3a().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::Vec3Arust-analyzer cargo glam 0.28.0 f32/sse2/vec3a/Vec3A# {
935 craterust-analyzer cargo glam 0.28.0 crate/::Vec3Arust-analyzer cargo glam 0.28.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.28.0 f32/sse2/vec3a/impl#[Vec3A]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as f32, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as f32, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as f32)
936 }
937
938 /// Casts all elements of `self` to `i16`.
939 #[inline]
940 #[must_use]
941 pub fn as_i16vec3rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_i16vec3().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::I16Vec3rust-analyzer cargo glam 0.28.0 i16/i16vec3/I16Vec3# {
942 craterust-analyzer cargo glam 0.28.0 crate/::I16Vec3rust-analyzer cargo glam 0.28.0 i16/i16vec3/I16Vec3#::newrust-analyzer cargo glam 0.28.0 i16/i16vec3/impl#[I16Vec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as i16, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as i16, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as i16)
943 }
944
945 /// Casts all elements of `self` to `u16`.
946 #[inline]
947 #[must_use]
948 pub fn as_u16vec3rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_u16vec3().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::U16Vec3rust-analyzer cargo glam 0.28.0 u16/u16vec3/U16Vec3# {
949 craterust-analyzer cargo glam 0.28.0 crate/::U16Vec3rust-analyzer cargo glam 0.28.0 u16/u16vec3/U16Vec3#::newrust-analyzer cargo glam 0.28.0 u16/u16vec3/impl#[U16Vec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as u16, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as u16, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as u16)
950 }
951
952 /// Casts all elements of `self` to `i32`.
953 #[inline]
954 #[must_use]
955 pub fn as_ivec3rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_ivec3().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::IVec3rust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3# {
956 craterust-analyzer cargo glam 0.28.0 crate/::IVec3rust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3#::newrust-analyzer cargo glam 0.28.0 i32/ivec3/impl#[IVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as i32, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as i32, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as i32)
957 }
958
959 /// Casts all elements of `self` to `u32`.
960 #[inline]
961 #[must_use]
962 pub fn as_uvec3rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_uvec3().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::UVec3rust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3# {
963 craterust-analyzer cargo glam 0.28.0 crate/::UVec3rust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3#::newrust-analyzer cargo glam 0.28.0 u32/uvec3/impl#[UVec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as u32, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as u32, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as u32)
964 }
965
966 /// Casts all elements of `self` to `i64`.
967 #[inline]
968 #[must_use]
969 pub fn as_i64vec3rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_i64vec3().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::I64Vec3rust-analyzer cargo glam 0.28.0 i64/i64vec3/I64Vec3# {
970 craterust-analyzer cargo glam 0.28.0 crate/::I64Vec3rust-analyzer cargo glam 0.28.0 i64/i64vec3/I64Vec3#::newrust-analyzer cargo glam 0.28.0 i64/i64vec3/impl#[I64Vec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as i64, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as i64, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as i64)
971 }
972
973 /// Casts all elements of `self` to `u64`.
974 #[inline]
975 #[must_use]
976 pub fn as_u64vec3rust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]as_u64vec3().(&self) -> craterust-analyzer cargo glam 0.28.0 crate/::U64Vec3rust-analyzer cargo glam 0.28.0 u64/u64vec3/U64Vec3# {
977 craterust-analyzer cargo glam 0.28.0 crate/::U64Vec3rust-analyzer cargo glam 0.28.0 u64/u64vec3/U64Vec3#::newrust-analyzer cargo glam 0.28.0 u64/u64vec3/impl#[U64Vec3]new().(self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x. as u64, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y. as u64, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z. as u64)
978 }
979 }
980
981 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
982 #[inline(always)]
983 fn defaultrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Default]default().() -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Default] {
984 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Default]::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ZERO.
985 }
986 }
987
988 impl Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
989 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<Self>`];
990 #[inline]
991 fn divrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<Self>`]div().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<Self>`] {
992 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<Self>`] {
993 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
994 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
995 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
996 }
997 }
998 }
999
1000 impl DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1001 #[inline]
1002 fn div_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`DivAssign<Self>`]div_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`DivAssign<Self>`]) {
1003 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..div_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`DivAssign<Self>`]div_assign().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.);
1004 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..div_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`DivAssign<Self>`]div_assign().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.);
1005 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..div_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`DivAssign<Self>`]div_assign().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
1006 }
1007 }
1008
1009 impl Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1010 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`];
1011 #[inline]
1012 fn divrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`]div().(self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`] {
1013 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Div<f64>`] {
1014 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs),
1015 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs),
1016 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs),
1017 }
1018 }
1019 }
1020
1021 impl DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1022 #[inline]
1023 fn div_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`DivAssign<f64>`]div_assign().(&mut self, rhs: f64) {
1024 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..div_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`DivAssign<Self>`]div_assign().(rhs);
1025 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..div_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`DivAssign<Self>`]div_assign().(rhs);
1026 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..div_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`DivAssign<Self>`]div_assign().(rhs);
1027 }
1028 }
1029
1030 impl Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for f64 {
1031 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Div<DVec3>`]Output# = DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#;
1032 #[inline]
1033 fn divrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Div<DVec3>`]div().(self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1034 DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1035 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1036 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1037 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1038 }
1039 }
1040 }
1041
1042 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1043 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`];
1044 #[inline]
1045 fn mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`]mul().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`] {
1046 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`] {
1047 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1048 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1049 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1050 }
1051 }
1052 }
1053
1054 impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1055 #[inline]
1056 fn mul_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`MulAssign<Self>`]mul_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`MulAssign<Self>`]) {
1057 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..mul_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`MulAssign<Self>`]mul_assign().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.);
1058 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..mul_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`MulAssign<Self>`]mul_assign().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.);
1059 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..mul_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`MulAssign<Self>`]mul_assign().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
1060 }
1061 }
1062
1063 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1064 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`];
1065 #[inline]
1066 fn mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`]mul().(self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`] {
1067 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<f64>`] {
1068 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs),
1069 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs),
1070 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs),
1071 }
1072 }
1073 }
1074
1075 impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1076 #[inline]
1077 fn mul_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`MulAssign<f64>`]mul_assign().(&mut self, rhs: f64) {
1078 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..mul_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`MulAssign<Self>`]mul_assign().(rhs);
1079 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..mul_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`MulAssign<Self>`]mul_assign().(rhs);
1080 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..mul_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`MulAssign<Self>`]mul_assign().(rhs);
1081 }
1082 }
1083
1084 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for f64 {
1085 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]Output# = DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#;
1086 #[inline]
1087 fn mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Mul<DVec3>`]mul().(self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1088 DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1089 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1090 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1091 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1092 }
1093 }
1094 }
1095
1096 impl Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1097 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`];
1098 #[inline]
1099 fn addrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`] {
1100 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`] {
1101 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1102 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1103 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1104 }
1105 }
1106 }
1107
1108 impl AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1109 #[inline]
1110 fn add_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`AddAssign<Self>`]add_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`AddAssign<Self>`]) {
1111 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..add_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`AddAssign<Self>`]add_assign().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.);
1112 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..add_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`AddAssign<Self>`]add_assign().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.);
1113 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..add_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`AddAssign<Self>`]add_assign().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
1114 }
1115 }
1116
1117 impl Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1118 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<f64>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<f64>`];
1119 #[inline]
1120 fn addrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<f64>`]add().(self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<f64>`] {
1121 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<f64>`] {
1122 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs),
1123 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs),
1124 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs),
1125 }
1126 }
1127 }
1128
1129 impl AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1130 #[inline]
1131 fn add_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`AddAssign<f64>`]add_assign().(&mut self, rhs: f64) {
1132 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..add_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`AddAssign<Self>`]add_assign().(rhs);
1133 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..add_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`AddAssign<Self>`]add_assign().(rhs);
1134 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..add_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`AddAssign<Self>`]add_assign().(rhs);
1135 }
1136 }
1137
1138 impl Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for f64 {
1139 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Add<DVec3>`]Output# = DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#;
1140 #[inline]
1141 fn addrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Add<DVec3>`]add().(self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1142 DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1143 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1144 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1145 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Add<Self>`]add().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1146 }
1147 }
1148 }
1149
1150 impl Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1151 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`];
1152 #[inline]
1153 fn subrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]sub().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`] {
1154 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<Self>`] {
1155 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1156 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1157 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1158 }
1159 }
1160 }
1161
1162 impl SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1163 #[inline]
1164 fn sub_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`SubAssign<Self>`]sub_assign().(&mut self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) {
1165 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..sub_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`SubAssign<Self>`]sub_assign().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.);
1166 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..sub_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`SubAssign<Self>`]sub_assign().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.);
1167 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..sub_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`SubAssign<Self>`]sub_assign().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
1168 }
1169 }
1170
1171 impl Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1172 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<f64>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<f64>`];
1173 #[inline]
1174 fn subrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<f64>`]sub().(self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<f64>`] {
1175 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sub<f64>`] {
1176 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs),
1177 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs),
1178 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs),
1179 }
1180 }
1181 }
1182
1183 impl SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1184 #[inline]
1185 fn sub_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`SubAssign<f64>`]sub_assign().(&mut self, rhs: f64) {
1186 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..sub_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`SubAssign<Self>`]sub_assign().(rhs);
1187 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..sub_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`SubAssign<Self>`]sub_assign().(rhs);
1188 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..sub_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`SubAssign<Self>`]sub_assign().(rhs);
1189 }
1190 }
1191
1192 impl Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for f64 {
1193 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Sub<DVec3>`]Output# = DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#;
1194 #[inline]
1195 fn subrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Sub<DVec3>`]sub().(self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1196 DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1197 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1198 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1199 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Sub<Self>`]sub().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1200 }
1201 }
1202 }
1203
1204 impl Remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1205 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<Self>`];
1206 #[inline]
1207 fn remrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<Self>`]rem().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<Self>`] {
1208 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<Self>`] {
1209 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1210 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1211 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1212 }
1213 }
1214 }
1215
1216 impl RemAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/RemAssign#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1217 #[inline]
1218 fn rem_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`RemAssign<Self>`]rem_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`RemAssign<Self>`]) {
1219 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..rem_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`RemAssign<Self>`]rem_assign().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.);
1220 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..rem_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`RemAssign<Self>`]rem_assign().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.);
1221 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..rem_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`RemAssign<Self>`]rem_assign().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.);
1222 }
1223 }
1224
1225 impl Remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1226 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<f64>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<f64>`];
1227 #[inline]
1228 fn remrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<f64>`]rem().(self, rhs: f64) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<f64>`] {
1229 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Rem<f64>`] {
1230 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs),
1231 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs),
1232 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs),
1233 }
1234 }
1235 }
1236
1237 impl RemAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/RemAssign#<f64> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1238 #[inline]
1239 fn rem_assignrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`RemAssign<f64>`]rem_assign().(&mut self, rhs: f64) {
1240 self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..rem_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`RemAssign<Self>`]rem_assign().(rhs);
1241 self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..rem_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`RemAssign<Self>`]rem_assign().(rhs);
1242 self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..rem_assignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`RemAssign<Self>`]rem_assign().(rhs);
1243 }
1244 }
1245
1246 impl Remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for f64 {
1247 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Rem<DVec3>`]Output# = DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#;
1248 #[inline]
1249 fn remrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[f64][`Rem<DVec3>`]rem().(self, rhs: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1250 DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1251 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.),
1252 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.),
1253 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Rem<Self>`]rem().(rhs.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.),
1254 }
1255 }
1256 }
1257
1258 #[cfg(not(target_arch = "spirv"))]
1259 impl AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<[f64; 3]> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1260 #[inline]
1261 fn as_refrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`AsRef<[f64; 3]>`]as_ref().(&self) -> &[f64; 3] {
1262 unsafe { &*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().(self as *const DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# as *const [f64; 3]) }
1263 }
1264 }
1265
1266 #[cfg(not(target_arch = "spirv"))]
1267 impl AsMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsMut#<[f64; 3]> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1268 #[inline]
1269 fn as_mutrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`AsMut<[f64; 3]>`]as_mut().(&mut self) -> &mut [f64; 3] {
1270 unsafe { &mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#deref().(self as *mut DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# as *mut [f64; 3]) }
1271 }
1272 }
1273
1274 impl Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum# for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1275 #[inline]
1276 fn sumrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<Self>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<Self>`]
1277 where
1278 I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<Self>`]>,
1279 {
1280 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<Self>`]::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ZERO., Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<Self>`]::addrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().)
1281 }
1282 }
1283
1284 impl<'a> Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<&'a Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<&'a DVec3>`]> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1285 #[inline]
1286 fn sumrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<&'a DVec3>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<&'a DVec3>`]
1287 where
1288 I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = &'a Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<&'a DVec3>`]>,
1289 {
1290 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<&'a DVec3>`]::ZEROrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ZERO., |a, &b| Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Sum<&'a DVec3>`]::addrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Add<Self>`]add().(a, b))
1291 }
1292 }
1293
1294 impl Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product# for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1295 #[inline]
1296 fn productrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<Self>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<Self>`]
1297 where
1298 I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<Self>`]>,
1299 {
1300 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<Self>`]::ONErust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ONE., Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<Self>`]::mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`]mul().)
1301 }
1302 }
1303
1304 impl<'a> Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#<&'a Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<&'a DVec3>`]> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1305 #[inline]
1306 fn productrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<&'a DVec3>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<&'a DVec3>`]
1307 where
1308 I: Iteratorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#<Itemrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#Item# = &'a Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<&'a DVec3>`]>,
1309 {
1310 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<&'a DVec3>`]::ONErust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]ONE., |a, &b| Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Product<&'a DVec3>`]::mulrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Mul<Self>`]mul().(a, b))
1311 }
1312 }
1313
1314 impl Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg# for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1315 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Neg]Output# = Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Neg];
1316 #[inline]
1317 fn negrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Neg]neg().(self) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Neg] {
1318 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Neg] {
1319 xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.: self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x..negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(),
1320 yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.: self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y..negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(),
1321 zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.: self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z..negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().(),
1322 }
1323 }
1324 }
1325
1326 impl Indexrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#<usize> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1327 type Outputrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Index<usize>`]Output# = f64;
1328 #[inline]
1329 fn indexrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Index<usize>`]index().(&self, index: usize) -> &Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`Index<usize>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#Output# {
1330 match index {
1331 0 => &self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.,
1332 1 => &self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.,
1333 2 => &self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.,
1334 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
1335 }
1336 }
1337 }
1338
1339 impl IndexMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#<usize> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1340 #[inline]
1341 fn index_mutrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`IndexMut<usize>`]index_mut().(&mut self, index: usize) -> &mut Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`IndexMut<usize>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#Output# {
1342 match index {
1343 0 => &mut self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.,
1344 1 => &mut self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.,
1345 2 => &mut self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.,
1346 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
1347 }
1348 }
1349 }
1350
1351 #[cfg(not(target_arch = "spirv"))]
1352 impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1353 fn fmtrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Display]fmt().(&self, f: &mut fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1354 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(p) = f.precisionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]precision().() {
1355 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "[{:.*}, {:.*}, {:.*}]", p, self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., p, self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., p, self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.)
1356 } else {
1357 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "[{}, {}, {}]", self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.)
1358 }
1359 }
1360 }
1361
1362 #[cfg(not(target_arch = "spirv"))]
1363 impl fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug# for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1364 fn fmtrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][Debug]fmt().(&self, fmt: &mut fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#<'_>) -> fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1365 fmt.debug_tuplerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_tuple().(stringifyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/stringify!!(DVec3))
1366 .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]field().(&self.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x.)
1367 .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]field().(&self.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y.)
1368 .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]field().(&self.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.)
1369 .finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugTuple<'a, 'b>`]finish().()
1370 }
1371 }
1372
1373 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<[f64; 3]> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1374 #[inline]
1375 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<[f64; 3]>`]from().(a: [f64; 3]) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<[f64; 3]>`] {
1376 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<[f64; 3]>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(a[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., a[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()., a[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().)
1377 }
1378 }
1379
1380 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for [f64; 3] {
1381 #[inline]
1382 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[`[f64; 3]`][`From<DVec3>`]from().(v: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[`[f64; 3]`][`From<DVec3>`] {
1383 [v.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., v.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., v.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.]
1384 }
1385 }
1386
1387 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<(f64, f64, f64)> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1388 #[inline]
1389 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<(f64, f64, f64)>`]from().(t: (f64, f64, f64)) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<(f64, f64, f64)>`] {
1390 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<(f64, f64, f64)>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(t.0, t.1, t.2)
1391 }
1392 }
1393
1394 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#> for (f64, f64, f64) {
1395 #[inline]
1396 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[`(f64, f64, f64)`][`From<DVec3>`]from().(v: DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[`(f64, f64, f64)`][`From<DVec3>`] {
1397 (v.xrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#x., v.yrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#y., v.zrust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3#z.)
1398 }
1399 }
1400
1401 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<(DVec2rust-analyzer cargo glam 0.28.0 f64/dvec2/DVec2#, f64)> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1402 #[inline]
1403 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<(DVec2, f64)>`]from().((v, z): (DVec2rust-analyzer cargo glam 0.28.0 f64/dvec2/DVec2#, f64)) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<(DVec2, f64)>`] {
1404 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<(DVec2, f64)>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(v.xrust-analyzer cargo glam 0.28.0 f64/dvec2/DVec2#x., v.yrust-analyzer cargo glam 0.28.0 f64/dvec2/DVec2#y., z)
1405 }
1406 }
1407
1408 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Vec3rust-analyzer cargo glam 0.28.0 f32/vec3/Vec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1409 #[inline]
1410 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<Vec3>`]from().(v: Vec3rust-analyzer cargo glam 0.28.0 f32/vec3/Vec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<Vec3>`] {
1411 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<Vec3>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<f32>`]from().(v.xrust-analyzer cargo glam 0.28.0 f32/vec3/Vec3#x.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<f32>`]from().(v.yrust-analyzer cargo glam 0.28.0 f32/vec3/Vec3#y.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<f32>`]from().(v.zrust-analyzer cargo glam 0.28.0 f32/vec3/Vec3#z.))
1412 }
1413 }
1414
1415 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<IVec3rust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1416 #[inline]
1417 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<IVec3>`]from().(v: IVec3rust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<IVec3>`] {
1418 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<IVec3>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(v.xrust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3#x.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(v.yrust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3#y.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<i32>`]from().(v.zrust-analyzer cargo glam 0.28.0 i32/ivec3/IVec3#z.))
1419 }
1420 }
1421
1422 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<UVec3rust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1423 #[inline]
1424 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<UVec3>`]from().(v: UVec3rust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<UVec3>`] {
1425 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<UVec3>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(v.xrust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3#x.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(v.yrust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3#y.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<u32>`]from().(v.zrust-analyzer cargo glam 0.28.0 u32/uvec3/UVec3#z.))
1426 }
1427 }
1428
1429 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1430 #[inline]
1431 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<BVec3>`]from().(v: BVec3rust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<BVec3>`] {
1432 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<BVec3>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<bool>`]from().(v.xrust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#x.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<bool>`]from().(v.yrust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#y.), f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<bool>`]from().(v.zrust-analyzer cargo glam 0.28.0 bool/bvec3/BVec3#z.))
1433 }
1434 }
1435
1436 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<BVec3Arust-analyzer cargo glam 0.28.0 bool/sse2/bvec3a/BVec3A#> for DVec3rust-analyzer cargo glam 0.28.0 f64/dvec3/DVec3# {
1437 #[inline]
1438 fn fromrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<BVec3A>`]from().(v: BVec3Arust-analyzer cargo glam 0.28.0 bool/sse2/bvec3a/BVec3A#) -> Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<BVec3A>`] {
1439 let bool_array: [bool; 3] = v.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().();
1440 Selfrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3][`From<BVec3A>`]::newrust-analyzer cargo glam 0.28.0 f64/dvec3/impl#[DVec3]new().(
1441 f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<bool>`]from().(bool_array[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().),
1442 f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<bool>`]from().(bool_array[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().),
1443 f64::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[f64][`From<bool>`]from().(bool_array[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().),
1444 )
1445 }
1446 }