Debian Codegraph @

debian/missing-sources/glam-0.28.0/src/f32/sse2/mat2.rs

raw symbols SCIP
1 // Generated from mat.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/, swizzlesrust-analyzer cargo glam 0.28.0 swizzles/::*, DMat2rust-analyzer cargo glam 0.28.0 f64/dmat2/DMat2#, Mat3rust-analyzer cargo glam 0.28.0 f32/mat3/Mat3#, Mat3Arust-analyzer cargo glam 0.28.0 f32/sse2/mat3a/Mat3A#, Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#};
4 #[cfg(not(target_arch = "spirv"))]
5 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/;
6 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#};
7 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::{Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#, AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#, Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#, DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#, Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#, MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#, Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#, Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#, SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#};
8
9 #[cfg(target_arch = "x86")]
10 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::*;
11 #[cfg(target_arch = "x86_64")]
12 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/::*;
13
14 #[repr(C)]
15 union UnionCastrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast# {
16 arust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast#a.: [f32; 4],
17 vrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast#v.: Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#,
18 }
19
20 /// Creates a 2x2 matrix from two column vectors.
21 #[inline(always)]
22 #[must_use]
23 pub const fn mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/mat2().(x_axis: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#, y_axis: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#) -> Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
24 Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(x_axis, y_axis)
25 }
26
27 /// A 2x2 column major matrix.
28 ///
29 /// SIMD vector types are used for storage on supported platforms.
30 ///
31 /// This type is 16 byte aligned.
32 #[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:)]
33 #[repr(transparent)]
34 pub struct Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#(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#);
35
36 impl Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
37 /// A 2x2 matrix with all elements set to `0.0`.
38 pub const ZEROrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]ZERO.: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::ZEROrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]ZERO., Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::ZEROrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]ZERO.);
39
40 /// A 2x2 identity matrix, where all diagonal elements are `1`, and all off-diagonal elements are `0`.
41 pub const IDENTITYrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]IDENTITY.: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::Xrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]X., Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::Yrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]Y.);
42
43 /// All NAN:s.
44 pub const NANrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]NAN.: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::NANrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]NAN., Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::NANrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]NAN.);
45
46 #[allow(clippy::too_many_arguments)]
47 #[inline(always)]
48 #[must_use]
49 const fn newrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]new().(m00: f32, m01: f32, m10: f32, m11: f32) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
50 unsafe {
51 UnionCastrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast# {
52 arust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast#a.: [m00, m01, m10, m11],
53 }
54 .vrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast#v.
55 }
56 }
57
58 /// Creates a 2x2 matrix from two column vectors.
59 #[inline(always)]
60 #[must_use]
61 pub const fn from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(x_axis: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#, y_axis: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
62 unsafe {
63 UnionCastrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast# {
64 arust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast#a.: [x_axis.xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x., x_axis.yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y., y_axis.xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x., y_axis.yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y.],
65 }
66 .vrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/UnionCast#v.
67 }
68 }
69
70 /// Creates a 2x2 matrix from a `[f32; 4]` array stored in column major order.
71 /// If your data is stored in row major you will need to `transpose` the returned
72 /// matrix.
73 #[inline]
74 #[must_use]
75 pub const fn from_cols_arrayrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols_array().(m: &[f32; 4]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
76 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::newrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]new().(m[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()., m[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()., m[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()., m[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().)
77 }
78
79 /// Creates a `[f32; 4]` array storing data in column major order.
80 /// If you require data in row major order `transpose` the matrix first.
81 #[inline]
82 #[must_use]
83 pub const fn to_cols_arrayrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]to_cols_array().(&self) -> [f32; 4] {
84 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/mat2/impl#[Mat2] as *const [f32; 4]) }
85 }
86
87 /// Creates a 2x2 matrix from a `[[f32; 2]; 2]` 2D array stored in column major order.
88 /// If your data is in row major order you will need to `transpose` the returned
89 /// matrix.
90 #[inline]
91 #[must_use]
92 pub const fn from_cols_array_2drust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols_array_2d().(m: &[[f32; 2]; 2]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
93 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::from_arrayrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]from_array().(m[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().), Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::from_arrayrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]from_array().(m[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().))
94 }
95
96 /// Creates a `[[f32; 2]; 2]` 2D array storing data in column major order.
97 /// If you require data in row major order `transpose` the matrix first.
98 #[inline]
99 #[must_use]
100 pub const fn to_cols_array_2drust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]to_cols_array_2d().(&self) -> [[f32; 2]; 2] {
101 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/mat2/impl#[Mat2] as *const [[f32; 2]; 2]) }
102 }
103
104 /// Creates a 2x2 matrix with its diagonal set to `diagonal` and all other entries set to 0.
105 #[doc(alias = "scale")]
106 #[inline]
107 #[must_use]
108 pub const fn from_diagonalrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_diagonal().(diagonal: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
109 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::newrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]new().(diagonal.xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x., 0.0, 0.0, diagonal.yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y.)
110 }
111
112 /// Creates a 2x2 matrix containing the combining non-uniform `scale` and rotation of
113 /// `angle` (in radians).
114 #[inline]
115 #[must_use]
116 pub fn from_scale_anglerust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_scale_angle().(scale: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#, angle: f32) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
117 let (sin, cos) = mathrust-analyzer cargo glam 0.28.0 f32/math/::sin_cosrust-analyzer cargo glam 0.28.0 f32/math/std_math/sin_cos().(angle);
118 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::newrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]new().(cos 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().scale.xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x., sin 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().scale.xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().sin 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().scale.yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y., cos 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().scale.yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y.)
119 }
120
121 /// Creates a 2x2 matrix containing a rotation of `angle` (in radians).
122 #[inline]
123 #[must_use]
124 pub fn from_anglerust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_angle().(angle: f32) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
125 let (sin, cos) = mathrust-analyzer cargo glam 0.28.0 f32/math/::sin_cosrust-analyzer cargo glam 0.28.0 f32/math/std_math/sin_cos().(angle);
126 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::newrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]new().(cos, sin, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().sin, cos)
127 }
128
129 /// Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column.
130 #[inline]
131 #[must_use]
132 pub fn from_mat3rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_mat3().(m: Mat3rust-analyzer cargo glam 0.28.0 f32/mat3/Mat3#) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
133 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(m.x_axisrust-analyzer cargo glam 0.28.0 f32/mat3/Mat3#x_axis..xyrust-analyzer cargo glam 0.28.0 swizzles/vec3_impl/impl#[Vec3][Vec3Swizzles]xy().(), m.y_axisrust-analyzer cargo glam 0.28.0 f32/mat3/Mat3#y_axis..xyrust-analyzer cargo glam 0.28.0 swizzles/vec3_impl/impl#[Vec3][Vec3Swizzles]xy().())
134 }
135
136 /// Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column.
137 #[inline]
138 #[must_use]
139 pub fn from_mat3arust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_mat3a().(m: Mat3Arust-analyzer cargo glam 0.28.0 f32/sse2/mat3a/Mat3A#) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
140 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(m.x_axisrust-analyzer cargo glam 0.28.0 f32/sse2/mat3a/Mat3A#x_axis..xyrust-analyzer cargo glam 0.28.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xy().(), m.y_axisrust-analyzer cargo glam 0.28.0 f32/sse2/mat3a/Mat3A#y_axis..xyrust-analyzer cargo glam 0.28.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xy().())
141 }
142
143 /// Creates a 2x2 matrix from the first 4 values in `slice`.
144 ///
145 /// # Panics
146 ///
147 /// Panics if `slice` is less than 4 elements long.
148 #[inline]
149 #[must_use]
150 pub const fn from_cols_slicerust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols_slice().(slice: &[f32]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
151 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::newrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]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().)
152 }
153
154 /// Writes the columns of `self` to the first 4 elements in `slice`.
155 ///
156 /// # Panics
157 ///
158 /// Panics if `slice` is less than 4 elements long.
159 #[inline]
160 pub fn write_cols_to_slicerust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]write_cols_to_slice().(self, slice: &mut [f32]) {
161 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().0]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x.;
162 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().1]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y.;
163 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x.;
164 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().3]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y.;
165 }
166
167 /// Returns the matrix column for the given `index`.
168 ///
169 /// # Panics
170 ///
171 /// Panics if `index` is greater than 1.
172 #[inline]
173 #[must_use]
174 pub fn colrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]col().(&self, index: usize) -> Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2# {
175 match index {
176 0 => self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis.,
177 1 => self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis.,
178 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
179 }
180 }
181
182 /// Returns a mutable reference to the matrix column for the given `index`.
183 ///
184 /// # Panics
185 ///
186 /// Panics if `index` is greater than 1.
187 #[inline]
188 pub fn col_mutrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]col_mut().(&mut self, index: usize) -> &mut Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2# {
189 match index {
190 0 => &mut self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis.,
191 1 => &mut self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis.,
192 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
193 }
194 }
195
196 /// Returns the matrix row for the given `index`.
197 ///
198 /// # Panics
199 ///
200 /// Panics if `index` is greater than 1.
201 #[inline]
202 #[must_use]
203 pub fn rowrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]row().(&self, index: usize) -> Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2# {
204 match index {
205 0 => Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::newrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]new().(self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x., self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x.),
206 1 => Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#::newrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]new().(self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y., self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y.),
207 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
208 }
209 }
210
211 /// Returns `true` if, and only if, all elements are finite.
212 /// If any element is either `NaN`, positive or negative infinity, this will return `false`.
213 #[inline]
214 #[must_use]
215 pub fn is_finiterust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]is_finite().(&self) -> bool {
216 self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..is_finiterust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]is_finite().() && self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..is_finiterust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]is_finite().()
217 }
218
219 /// Returns `true` if any elements are `NaN`.
220 #[inline]
221 #[must_use]
222 pub fn is_nanrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]is_nan().(&self) -> bool {
223 self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..is_nanrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]is_nan().() || self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..is_nanrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]is_nan().()
224 }
225
226 /// Returns the transpose of `self`.
227 #[inline]
228 #[must_use]
229 pub fn transposerust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]transpose().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
230 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2](unsafe { _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(self.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0., self.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0., 0b11_01_10_00) })
231 }
232
233 /// Returns the determinant of `self`.
234 #[inline]
235 #[must_use]
236 pub fn determinantrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]determinant().(&self) -> f32 {
237 unsafe {
238 let abcd = self.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0.;
239 let dcba = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(abcd, abcd, 0b00_01_10_11);
240 let prod = _mm_mul_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_mul_ps().(abcd, dcba);
241 let det = _mm_sub_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_sub_ps().(prod, _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(prod, prod, 0b01_01_01_01));
242 _mm_cvtss_f32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_cvtss_f32().(det)
243 }
244 }
245
246 /// Returns the inverse of `self`.
247 ///
248 /// If the matrix is not invertible the returned matrix will be invalid.
249 ///
250 /// # Panics
251 ///
252 /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled.
253 #[inline]
254 #[must_use]
255 pub fn inverserust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]inverse().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
256 unsafe {
257 const SIGNrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/SIGN.: __m128rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/__m128# = craterust-analyzer cargo glam 0.28.0 crate/::sse2rust-analyzer cargo glam 0.28.0 sse2/::m128_from_f32x4rust-analyzer cargo glam 0.28.0 sse2/m128_from_f32x4().([1.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().1.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().1.0, 1.0]);
258 let abcd = self.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0.;
259 let dcba = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(abcd, abcd, 0b00_01_10_11);
260 let prod = _mm_mul_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_mul_ps().(abcd, dcba);
261 let sub = _mm_sub_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_sub_ps().(prod, _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(prod, prod, 0b01_01_01_01));
262 let det = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(sub, sub, 0b00_00_00_00);
263 let tmp = _mm_div_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_div_ps().(SIGNrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/SIGN., det);
264 glam_assertrust-analyzer cargo glam 0.28.0 macros/glam_assert!!(Mat2(tmp).is_finite());
265 let dbca = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(abcd, abcd, 0b00_10_01_11);
266 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2](_mm_mul_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_mul_ps().(dbca, tmp))
267 }
268 }
269
270 /// Transforms a 2D vector.
271 #[inline]
272 #[must_use]
273 pub fn mul_vec2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_vec2().(&self, rhs: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#) -> Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2# {
274 unsafe {
275 use craterust-analyzer cargo glam 0.28.0 crate/::Align16rust-analyzer cargo glam 0.28.0 align16/Align16#;
276 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#;
277 let abcd = self.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0.;
278 let xxyy = _mm_set_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_set_ps().(rhs.yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y., rhs.yrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#y., rhs.xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x., rhs.xrust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#x.);
279 let axbxcydy = _mm_mul_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_mul_ps().(abcd, xxyy);
280 let cydyaxbx = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(axbxcydy, axbxcydy, 0b01_00_11_10);
281 let result = _mm_add_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_add_ps().(axbxcydy, cydyaxbx);
282 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#<Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#>> = 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().();
283 _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().(), result);
284 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.
285 }
286 }
287
288 /// Multiplies two 2x2 matrices.
289 #[inline]
290 #[must_use]
291 pub fn mul_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_mat2().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
292 unsafe {
293 let abcd = self.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0.;
294 let rhs = rhs.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0.;
295 let xxyy0 = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(rhs, rhs, 0b01_01_00_00);
296 let xxyy1 = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(rhs, rhs, 0b11_11_10_10);
297 let axbxcydy0 = _mm_mul_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_mul_ps().(abcd, xxyy0);
298 let axbxcydy1 = _mm_mul_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_mul_ps().(abcd, xxyy1);
299 let cydyaxbx0 = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(axbxcydy0, axbxcydy0, 0b01_00_11_10);
300 let cydyaxbx1 = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(axbxcydy1, axbxcydy1, 0b01_00_11_10);
301 let result0 = _mm_add_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_add_ps().(axbxcydy0, cydyaxbx0);
302 let result1 = _mm_add_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_add_ps().(axbxcydy1, cydyaxbx1);
303 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2](_mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(result0, result1, 0b01_00_01_00))
304 }
305 }
306
307 /// Adds two 2x2 matrices.
308 #[inline]
309 #[must_use]
310 pub fn add_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]add_mat2().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
311 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2](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/mat2/Mat2#0., rhs.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0.) })
312 }
313
314 /// Subtracts two 2x2 matrices.
315 #[inline]
316 #[must_use]
317 pub fn sub_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]sub_mat2().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
318 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2](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/mat2/Mat2#0., rhs.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0.) })
319 }
320
321 /// Multiplies a 2x2 matrix by a scalar.
322 #[inline]
323 #[must_use]
324 pub fn mul_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_scalar().(&self, rhs: f32) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
325 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2](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/mat2/Mat2#0., _mm_set_ps1rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_set_ps1().(rhs)) })
326 }
327
328 /// Divides a 2x2 matrix by a scalar.
329 #[inline]
330 #[must_use]
331 pub fn div_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]div_scalar().(&self, rhs: f32) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
332 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2](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/mat2/Mat2#0., _mm_set_ps1rust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_set_ps1().(rhs)) })
333 }
334
335 /// Returns true if the absolute difference of all elements between `self` and `rhs`
336 /// is less than or equal to `max_abs_diff`.
337 ///
338 /// This can be used to compare if two matrices contain similar elements. It works best
339 /// when comparing with a known value. The `max_abs_diff` that should be used used
340 /// depends on the values being compared against.
341 ///
342 /// For more see
343 /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).
344 #[inline]
345 #[must_use]
346 pub fn abs_diff_eqrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]abs_diff_eq().(&self, rhs: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2], max_abs_diff: f32) -> bool {
347 self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..abs_diff_eqrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]abs_diff_eq().(rhs.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis., max_abs_diff)
348 && self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..abs_diff_eqrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]abs_diff_eq().(rhs.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis., max_abs_diff)
349 }
350
351 /// Takes the absolute value of each element in `self`
352 #[inline]
353 #[must_use]
354 pub fn absrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]abs().(&self) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2] {
355 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]::from_colsrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]from_cols().(self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..absrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]abs().(), self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..absrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]abs().())
356 }
357
358 #[inline]
359 pub fn as_dmat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]as_dmat2().(&self) -> DMat2rust-analyzer cargo glam 0.28.0 f64/dmat2/DMat2# {
360 DMat2rust-analyzer cargo glam 0.28.0 f64/dmat2/DMat2#::from_colsrust-analyzer cargo glam 0.28.0 f64/dmat2/impl#[DMat2]from_cols().(self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..as_dvec2rust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]as_dvec2().(), self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..as_dvec2rust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2]as_dvec2().())
361 }
362 }
363
364 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
365 #[inline]
366 fn defaultrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Default]default().() -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Default] {
367 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Default]::IDENTITYrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]IDENTITY.
368 }
369 }
370
371 impl Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
372 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Add<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Add<Self>`];
373 #[inline]
374 fn addrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Add<Self>`]add().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Add<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Add<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#Output# {
375 self.add_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]add_mat2().(&rhs)
376 }
377 }
378
379 impl AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
380 #[inline]
381 fn add_assignrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`AddAssign<Self>`]add_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`AddAssign<Self>`]) {
382 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.add_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]add_mat2().(&rhs);
383 }
384 }
385
386 impl Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
387 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sub<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sub<Self>`];
388 #[inline]
389 fn subrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sub<Self>`]sub().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sub<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sub<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#Output# {
390 self.sub_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]sub_mat2().(&rhs)
391 }
392 }
393
394 impl SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
395 #[inline]
396 fn sub_assignrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`SubAssign<Self>`]sub_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`SubAssign<Self>`]) {
397 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.sub_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]sub_mat2().(&rhs);
398 }
399 }
400
401 impl Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg# for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
402 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Neg]Output# = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Neg];
403 #[inline]
404 fn negrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Neg]neg().(self) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Neg]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#Output# {
405 Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Neg](unsafe { _mm_xor_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_xor_ps().(self.0rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#0., _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)) })
406 }
407 }
408
409 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
410 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Self>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Self>`];
411 #[inline]
412 fn mulrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Self>`]mul().(self, rhs: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Self>`]) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
413 self.mul_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_mat2().(&rhs)
414 }
415 }
416
417 impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
418 #[inline]
419 fn mul_assignrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`MulAssign<Self>`]mul_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`MulAssign<Self>`]) {
420 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.mul_mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_mat2().(&rhs);
421 }
422 }
423
424 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
425 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]Output# = Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#;
426 #[inline]
427 fn mulrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]mul().(self, rhs: Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
428 self.mul_vec2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_vec2().(rhs)
429 }
430 }
431
432 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for f32 {
433 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[f32][`Mul<Mat2>`]Output# = Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#;
434 #[inline]
435 fn mulrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[f32][`Mul<Mat2>`]mul().(self, rhs: Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[f32][`Mul<Mat2>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
436 rhs.mul_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_scalar().(self)
437 }
438 }
439
440 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<f32> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
441 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<f32>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<f32>`];
442 #[inline]
443 fn mulrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<f32>`]mul().(self, rhs: f32) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<f32>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
444 self.mul_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_scalar().(rhs)
445 }
446 }
447
448 impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<f32> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
449 #[inline]
450 fn mul_assignrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`MulAssign<f32>`]mul_assign().(&mut self, rhs: f32) {
451 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.mul_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]mul_scalar().(rhs);
452 }
453 }
454
455 impl Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#> for f32 {
456 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[f32][`Div<Mat2>`]Output# = Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#;
457 #[inline]
458 fn divrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[f32][`Div<Mat2>`]div().(self, rhs: Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2#) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[f32][`Div<Mat2>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#Output# {
459 rhs.div_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]div_scalar().(self)
460 }
461 }
462
463 impl Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<f32> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
464 type Outputrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Div<f32>`]Output# = Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Div<f32>`];
465 #[inline]
466 fn divrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Div<f32>`]div().(self, rhs: f32) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Div<f32>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#Output# {
467 self.div_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]div_scalar().(rhs)
468 }
469 }
470
471 impl DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#<f32> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
472 #[inline]
473 fn div_assignrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`DivAssign<f32>`]div_assign().(&mut self, rhs: f32) {
474 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.div_scalarrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]div_scalar().(rhs);
475 }
476 }
477
478 impl Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sum<Self>`]> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
479 fn sumrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sum<Self>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sum<Self>`]
480 where
481 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/mat2/impl#[Mat2][`Sum<Self>`]>,
482 {
483 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/mat2/impl#[Mat2][`Sum<Self>`]::ZEROrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]ZERO., Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sum<Self>`]::addrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Add<Self>`]add().)
484 }
485 }
486
487 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/mat2/impl#[Mat2][`Sum<&'a Mat2>`]> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
488 fn sumrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sum<&'a Mat2>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sum<&'a Mat2>`]
489 where
490 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/mat2/impl#[Mat2][`Sum<&'a Mat2>`]>,
491 {
492 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/mat2/impl#[Mat2][`Sum<&'a Mat2>`]::ZEROrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]ZERO., |a, &b| Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Sum<&'a Mat2>`]::addrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Add<Self>`]add().(a, b))
493 }
494 }
495
496 impl Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product# for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
497 fn productrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Product<Self>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Product<Self>`]
498 where
499 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/mat2/impl#[Mat2][`Product<Self>`]>,
500 {
501 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/mat2/impl#[Mat2][`Product<Self>`]::IDENTITYrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]IDENTITY., Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Product<Self>`]::mulrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Self>`]mul().)
502 }
503 }
504
505 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/mat2/impl#[Mat2][`Product<&'a Mat2>`]> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
506 fn productrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Product<&'a Mat2>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Product<&'a Mat2>`]
507 where
508 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/mat2/impl#[Mat2][`Product<&'a Mat2>`]>,
509 {
510 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/mat2/impl#[Mat2][`Product<&'a Mat2>`]::IDENTITYrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2]IDENTITY., |a, &b| Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Product<&'a Mat2>`]::mulrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`Mul<Self>`]mul().(a, b))
511 }
512 }
513
514 impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq# for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
515 #[inline]
516 fn eqrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`PartialEq<Self>`]eq().(&self, rhs: &Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`PartialEq<Self>`]) -> bool {
517 self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis..eqrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2][`PartialEq<Self>`]eq().(&rhs.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis.) && self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis..eqrust-analyzer cargo glam 0.28.0 f32/vec2/impl#[Vec2][`PartialEq<Self>`]eq().(&rhs.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis.)
518 }
519 }
520
521 #[cfg(not(target_arch = "spirv"))]
522 impl AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<[f32; 4]> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
523 #[inline]
524 fn as_refrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`AsRef<[f32; 4]>`]as_ref().(&self) -> &[f32; 4] {
525 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/mat2/impl#[Mat2][`AsRef<[f32; 4]>`] as *const [f32; 4]) }
526 }
527 }
528
529 #[cfg(not(target_arch = "spirv"))]
530 impl AsMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsMut#<[f32; 4]> for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
531 #[inline]
532 fn as_mutrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][`AsMut<[f32; 4]>`]as_mut().(&mut self) -> &mut [f32; 4] {
533 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/mat2/impl#[Mat2][`AsMut<[f32; 4]>`] as *mut [f32; 4]) }
534 }
535 }
536
537 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::Derefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref# for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
538 type Targetrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Deref]Target# = craterust-analyzer cargo glam 0.28.0 crate/::derefrust-analyzer cargo glam 0.28.0 deref/::Cols2rust-analyzer cargo glam 0.28.0 deref/Cols2#<Vec2rust-analyzer cargo glam 0.28.0 f32/vec2/Vec2#>;
539 #[inline]
540 fn derefrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Deref]deref().(&self) -> &Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Deref]::Targetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#Target# {
541 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/mat2/impl#[Mat2][Deref] as *const Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][Deref]::Targetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#Target#) }
542 }
543 }
544
545 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::DerefMutrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/DerefMut# for Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
546 #[inline]
547 fn deref_mutrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][DerefMut]deref_mut().(&mut self) -> &mut Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][DerefMut]::Targetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#Target# {
548 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/mat2/impl#[Mat2][DerefMut] as *mut Selfrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][DerefMut]::Targetrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/Deref#Target#) }
549 }
550 }
551
552 #[cfg(not(target_arch = "spirv"))]
553 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 Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
554 fn fmtrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][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# {
555 fmt.debug_structrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/impl#[`Formatter<'a>`]debug_struct().(stringifyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/stringify!!(Mat2))
556 .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("x_axis", &self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis.)
557 .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("y_axis", &self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis.)
558 .finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]finish().()
559 }
560 }
561
562 #[cfg(not(target_arch = "spirv"))]
563 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 Mat2rust-analyzer cargo glam 0.28.0 f32/sse2/mat2/Mat2# {
564 fn fmtrust-analyzer cargo glam 0.28.0 f32/sse2/mat2/impl#[Mat2][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# {
565 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().() {
566 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "[{:.*}, {:.*}]", p, self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis., p, self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis.)
567 } else {
568 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "[{}, {}]", self.x_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#x_axis., self.y_axisrust-analyzer cargo glam 0.28.0 deref/Cols2#y_axis.)
569 }
570 }
571 }