Debian Codegraph @

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