Debian Codegraph @

debian/missing-sources/glam-0.25.0/src/f32/sse2/mat3a.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.25.0 crate/::{f32rust-analyzer cargo glam 0.25.0 f32/::mathrust-analyzer cargo glam 0.25.0 f32/math/, swizzlesrust-analyzer cargo glam 0.25.0 swizzles/::*, DMat3rust-analyzer cargo glam 0.25.0 f64/dmat3/DMat3#, EulerRotrust-analyzer cargo glam 0.25.0 euler/EulerRot#, Mat2rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/Mat2#, Mat3rust-analyzer cargo glam 0.25.0 f32/mat3/Mat3#, Mat4rust-analyzer cargo glam 0.25.0 f32/sse2/mat4/Mat4#, Quatrust-analyzer cargo glam 0.25.0 f32/sse2/quat/Quat#, Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#, Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#, Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#};
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#, 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 /// Creates a 3x3 matrix from three column vectors.
15 #[inline(always)]
16 #[must_use]
17 pub const fn mat3arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/mat3a().(x_axis: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#, y_axis: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#, z_axis: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#) -> Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
18 Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(x_axis, y_axis, z_axis)
19 }
20
21 /// A 3x3 column major matrix.
22 ///
23 /// This 3x3 matrix type features convenience methods for creating and using linear and
24 /// affine transformations. If you are primarily dealing with 2D affine transformations the
25 /// [`Affine2`](crate::Affine2) type is much faster and more space efficient than
26 /// using a 3x3 matrix.
27 ///
28 /// Linear transformations including 3D rotation and scale can be created using methods
29 /// such as [`Self::from_diagonal()`], [`Self::from_quat()`], [`Self::from_axis_angle()`],
30 /// [`Self::from_rotation_x()`], [`Self::from_rotation_y()`], or
31 /// [`Self::from_rotation_z()`].
32 ///
33 /// The resulting matrices can be use to transform 3D vectors using regular vector
34 /// multiplication.
35 ///
36 /// Affine transformations including 2D translation, rotation and scale can be created
37 /// using methods such as [`Self::from_translation()`], [`Self::from_angle()`],
38 /// [`Self::from_scale()`] and [`Self::from_scale_angle_translation()`].
39 ///
40 /// The [`Self::transform_point2()`] and [`Self::transform_vector2()`] convenience methods
41 /// are provided for performing affine transforms on 2D vectors and points. These multiply
42 /// 2D inputs as 3D vectors with an implicit `z` value of `1` for points and `0` for
43 /// vectors respectively. These methods assume that `Self` contains a valid affine
44 /// transform.
45 #[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:)]
46 #[repr(C)]
47 pub struct Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
48 pub x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#,
49 pub y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#,
50 pub z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#,
51 }
52
53 impl Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
54 /// A 3x3 matrix with all elements set to `0.0`.
55 pub const ZEROrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]ZERO.: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::ZEROrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]ZERO., Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::ZEROrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]ZERO., Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::ZEROrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]ZERO.);
56
57 /// A 3x3 identity matrix, where all diagonal elements are `1`, and all off-diagonal elements are `0`.
58 pub const IDENTITYrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]IDENTITY.: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Xrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]X., Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Yrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Y., Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Zrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Z.);
59
60 /// All NAN:s.
61 pub const NANrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]NAN.: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::NANrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]NAN., Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::NANrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]NAN., Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::NANrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]NAN.);
62
63 #[allow(clippy::too_many_arguments)]
64 #[inline(always)]
65 #[must_use]
66 const fn newrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]new().(
67 m00: f32,
68 m01: f32,
69 m02: f32,
70 m10: f32,
71 m11: f32,
72 m12: f32,
73 m20: f32,
74 m21: f32,
75 m22: f32,
76 ) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
77 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
78 x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(m00, m01, m02),
79 y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(m10, m11, m12),
80 z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(m20, m21, m22),
81 }
82 }
83
84 /// Creates a 3x3 matrix from three column vectors.
85 #[inline(always)]
86 #[must_use]
87 pub const fn from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(x_axis: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#, y_axis: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#, z_axis: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
88 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
89 x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.,
90 y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.,
91 z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.,
92 }
93 }
94
95 /// Creates a 3x3 matrix from a `[f32; 9]` array stored in column major order.
96 /// If your data is stored in row major you will need to `transpose` the returned
97 /// matrix.
98 #[inline]
99 #[must_use]
100 pub const fn from_cols_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols_array().(m: &[f32; 9]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
101 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::newrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]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()., m[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().4]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().5]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().6]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().7]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().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().)
102 }
103
104 /// Creates a `[f32; 9]` array storing data in column major order.
105 /// If you require data in row major order `transpose` the matrix first.
106 #[inline]
107 #[must_use]
108 pub const fn to_cols_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]to_cols_array().(&self) -> [f32; 9] {
109 let [x_axis_x, x_axis_y, x_axis_z] = self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..to_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]to_array().();
110 let [y_axis_x, y_axis_y, y_axis_z] = self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..to_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]to_array().();
111 let [z_axis_x, z_axis_y, z_axis_z] = self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..to_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]to_array().();
112
113 [
114 x_axis_x, x_axis_y, x_axis_z, y_axis_x, y_axis_y, y_axis_z, z_axis_x, z_axis_y,
115 z_axis_z,
116 ]
117 }
118
119 /// Creates a 3x3 matrix from a `[[f32; 3]; 3]` 3D array stored in column major order.
120 /// If your data is in row major order you will need to `transpose` the returned
121 /// matrix.
122 #[inline]
123 #[must_use]
124 pub const fn from_cols_array_2drust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols_array_2d().(m: &[[f32; 3]; 3]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
125 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
126 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::from_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]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().),
127 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::from_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]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().),
128 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::from_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]from_array().(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().),
129 )
130 }
131
132 /// Creates a `[[f32; 3]; 3]` 3D array storing data in column major order.
133 /// If you require data in row major order `transpose` the matrix first.
134 #[inline]
135 #[must_use]
136 pub const fn to_cols_array_2drust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]to_cols_array_2d().(&self) -> [[f32; 3]; 3] {
137 [
138 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..to_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]to_array().(),
139 self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..to_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]to_array().(),
140 self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..to_arrayrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]to_array().(),
141 ]
142 }
143
144 /// Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0.
145 #[doc(alias = "scale")]
146 #[inline]
147 #[must_use]
148 pub const fn from_diagonalrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_diagonal().(diagonal: Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
149 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::newrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]new().(
150 diagonal.xrust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#x., 0.0, 0.0, 0.0, diagonal.yrust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#y., 0.0, 0.0, 0.0, diagonal.zrust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#z.,
151 )
152 }
153
154 /// Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column.
155 #[inline]
156 #[must_use]
157 pub fn from_mat4rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_mat4().(m: Mat4rust-analyzer cargo glam 0.25.0 f32/sse2/mat4/Mat4#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
158 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(m.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat4/Mat4#x_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), m.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat4/Mat4#y_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), m.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat4/Mat4#z_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())
159 }
160
161 /// Creates a 3D rotation matrix from the given quaternion.
162 ///
163 /// # Panics
164 ///
165 /// Will panic if `rotation` is not normalized when `glam_assert` is enabled.
166 #[inline]
167 #[must_use]
168 pub fn from_quatrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_quat().(rotation: Quatrust-analyzer cargo glam 0.25.0 f32/sse2/quat/Quat#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
169 glam_assertrust-analyzer cargo glam 0.25.0 macros/glam_assert!!(rotation.is_normalized());
170
171 let x2 = rotation.xrust-analyzer cargo glam 0.25.0 deref/Vec4#x. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().rotation.xrust-analyzer cargo glam 0.25.0 deref/Vec4#x.;
172 let y2 = rotation.yrust-analyzer cargo glam 0.25.0 deref/Vec4#y. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().rotation.yrust-analyzer cargo glam 0.25.0 deref/Vec4#y.;
173 let z2 = rotation.zrust-analyzer cargo glam 0.25.0 deref/Vec4#z. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().rotation.zrust-analyzer cargo glam 0.25.0 deref/Vec4#z.;
174 let xx = rotation.xrust-analyzer cargo glam 0.25.0 deref/Vec4#x. 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().x2;
175 let xy = rotation.xrust-analyzer cargo glam 0.25.0 deref/Vec4#x. 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().y2;
176 let xz = rotation.xrust-analyzer cargo glam 0.25.0 deref/Vec4#x. 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().z2;
177 let yy = rotation.yrust-analyzer cargo glam 0.25.0 deref/Vec4#y. 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().y2;
178 let yz = rotation.yrust-analyzer cargo glam 0.25.0 deref/Vec4#y. 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().z2;
179 let zz = rotation.zrust-analyzer cargo glam 0.25.0 deref/Vec4#z. 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().z2;
180 let wx = rotation.wrust-analyzer cargo glam 0.25.0 deref/Vec4#w. 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().x2;
181 let wy = rotation.wrust-analyzer cargo glam 0.25.0 deref/Vec4#w. 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().y2;
182 let wz = rotation.wrust-analyzer cargo glam 0.25.0 deref/Vec4#w. 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().z2;
183
184 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
185 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(1.0 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().(yy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().zz), xy rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().wz, xz 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().wy),
186 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(xy 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().wz, 1.0 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().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().zz), yz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().wx),
187 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(xz rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().wy, yz 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().wx, 1.0 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().(xx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().yy)),
188 )
189 }
190
191 /// Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in
192 /// radians).
193 ///
194 /// # Panics
195 ///
196 /// Will panic if `axis` is not normalized when `glam_assert` is enabled.
197 #[inline]
198 #[must_use]
199 pub fn from_axis_anglerust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_axis_angle().(axis: Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#, angle: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
200 glam_assertrust-analyzer cargo glam 0.25.0 macros/glam_assert!!(axis.is_normalized());
201
202 let (sin, cos) = mathrust-analyzer cargo glam 0.25.0 f32/math/::sin_cosrust-analyzer cargo glam 0.25.0 f32/math/std_math/sin_cos().(angle);
203 let (xsin, ysin, zsin) = axis.mulrust-analyzer cargo glam 0.25.0 f32/vec3/impl#[Vec3][`Mul<f32>`]mul().(sin).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().();
204 let (x, y, z) = axis.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().();
205 let (x2, y2, z2) = axis.mulrust-analyzer cargo glam 0.25.0 f32/vec3/impl#[Vec3][`Mul<Self>`]mul().(axis).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().();
206 let omc = 1.0 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().cos;
207 let xyomc = x 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().y 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().omc;
208 let xzomc = x 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().z 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().omc;
209 let yzomc = y 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().z 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().omc;
210 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
211 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(x2 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().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().cos, xyomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().zsin, xzomc 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().ysin),
212 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(xyomc 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().zsin, y2 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().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().cos, yzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().xsin),
213 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(xzomc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().ysin, yzomc 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().xsin, z2 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().omc rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][`Add<Self>`]add().cos),
214 )
215 }
216
217 /// Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in
218 /// radians).
219 #[inline]
220 #[must_use]
221 pub fn from_eulerrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_euler().(order: EulerRotrust-analyzer cargo glam 0.25.0 euler/EulerRot#, a: f32, b: f32, c: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
222 let quat = Quatrust-analyzer cargo glam 0.25.0 f32/sse2/quat/Quat#::from_eulerrust-analyzer cargo glam 0.25.0 f32/sse2/quat/impl#[Quat]from_euler().(order, a, b, c);
223 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_quatrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_quat().(quat)
224 }
225
226 /// Creates a 3D rotation matrix from `angle` (in radians) around the x axis.
227 #[inline]
228 #[must_use]
229 pub fn from_rotation_xrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_rotation_x().(angle: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
230 let (sina, cosa) = mathrust-analyzer cargo glam 0.25.0 f32/math/::sin_cosrust-analyzer cargo glam 0.25.0 f32/math/std_math/sin_cos().(angle);
231 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
232 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Xrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]X.,
233 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(0.0, cosa, sina),
234 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().sina, cosa),
235 )
236 }
237
238 /// Creates a 3D rotation matrix from `angle` (in radians) around the y axis.
239 #[inline]
240 #[must_use]
241 pub fn from_rotation_yrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_rotation_y().(angle: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
242 let (sina, cosa) = mathrust-analyzer cargo glam 0.25.0 f32/math/::sin_cosrust-analyzer cargo glam 0.25.0 f32/math/std_math/sin_cos().(angle);
243 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
244 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(cosa, 0.0, -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().sina),
245 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Yrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Y.,
246 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(sina, 0.0, cosa),
247 )
248 }
249
250 /// Creates a 3D rotation matrix from `angle` (in radians) around the z axis.
251 #[inline]
252 #[must_use]
253 pub fn from_rotation_zrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_rotation_z().(angle: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
254 let (sina, cosa) = mathrust-analyzer cargo glam 0.25.0 f32/math/::sin_cosrust-analyzer cargo glam 0.25.0 f32/math/std_math/sin_cos().(angle);
255 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
256 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(cosa, sina, 0.0),
257 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().sina, cosa, 0.0),
258 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Zrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Z.,
259 )
260 }
261
262 /// Creates an affine transformation matrix from the given 2D `translation`.
263 ///
264 /// The resulting matrix can be used to transform 2D points and vectors. See
265 /// [`Self::transform_point2()`] and [`Self::transform_vector2()`].
266 #[inline]
267 #[must_use]
268 pub fn from_translationrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_translation().(translation: Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
269 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
270 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Xrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]X.,
271 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Yrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Y.,
272 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(translation.xrust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#x., translation.yrust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#y., 1.0),
273 )
274 }
275
276 /// Creates an affine transformation matrix from the given 2D rotation `angle` (in
277 /// radians).
278 ///
279 /// The resulting matrix can be used to transform 2D points and vectors. See
280 /// [`Self::transform_point2()`] and [`Self::transform_vector2()`].
281 #[inline]
282 #[must_use]
283 pub fn from_anglerust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_angle().(angle: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
284 let (sin, cos) = mathrust-analyzer cargo glam 0.25.0 f32/math/::sin_cosrust-analyzer cargo glam 0.25.0 f32/math/std_math/sin_cos().(angle);
285 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
286 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(cos, sin, 0.0),
287 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().sin, cos, 0.0),
288 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Zrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Z.,
289 )
290 }
291
292 /// Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in
293 /// radians) and `translation`.
294 ///
295 /// The resulting matrix can be used to transform 2D points and vectors. See
296 /// [`Self::transform_point2()`] and [`Self::transform_vector2()`].
297 #[inline]
298 #[must_use]
299 pub fn from_scale_angle_translationrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_scale_angle_translation().(scale: Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#, angle: f32, translation: Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
300 let (sin, cos) = mathrust-analyzer cargo glam 0.25.0 f32/math/::sin_cosrust-analyzer cargo glam 0.25.0 f32/math/std_math/sin_cos().(angle);
301 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
302 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]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.25.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.25.0 f32/vec2/Vec2#x., 0.0),
303 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(-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.25.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.25.0 f32/vec2/Vec2#y., 0.0),
304 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(translation.xrust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#x., translation.yrust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#y., 1.0),
305 )
306 }
307
308 /// Creates an affine transformation matrix from the given non-uniform 2D `scale`.
309 ///
310 /// The resulting matrix can be used to transform 2D points and vectors. See
311 /// [`Self::transform_point2()`] and [`Self::transform_vector2()`].
312 ///
313 /// # Panics
314 ///
315 /// Will panic if all elements of `scale` are zero when `glam_assert` is enabled.
316 #[inline]
317 #[must_use]
318 pub fn from_scalerust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_scale().(scale: Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
319 // Do not panic as long as any component is non-zero
320 glam_assertrust-analyzer cargo glam 0.25.0 macros/glam_assert!!(scale.cmpne(Vec2::ZERO).any());
321
322 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
323 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(scale.xrust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#x., 0.0, 0.0),
324 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(0.0, scale.yrust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#y., 0.0),
325 Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Zrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Z.,
326 )
327 }
328
329 /// Creates an affine transformation matrix from the given 2x2 matrix.
330 ///
331 /// The resulting matrix can be used to transform 2D points and vectors. See
332 /// [`Self::transform_point2()`] and [`Self::transform_vector2()`].
333 #[inline]
334 pub fn from_mat2rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_mat2().(m: Mat2rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/Mat2#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
335 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().((m.x_axisrust-analyzer cargo glam 0.25.0 deref/Cols2#x_axis., 0.0).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), (m.y_axisrust-analyzer cargo glam 0.25.0 deref/Cols2#y_axis., 0.0).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::Zrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]Z.)
336 }
337
338 /// Creates a 3x3 matrix from the first 9 values in `slice`.
339 ///
340 /// # Panics
341 ///
342 /// Panics if `slice` is less than 9 elements long.
343 #[inline]
344 #[must_use]
345 pub const fn from_cols_slicerust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols_slice().(slice: &[f32]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
346 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::newrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]new().(
347 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()., slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().4]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().5]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().6]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().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
348 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().,
349 )
350 }
351
352 /// Writes the columns of `self` to the first 9 elements in `slice`.
353 ///
354 /// # Panics
355 ///
356 /// Panics if `slice` is less than 9 elements long.
357 #[inline]
358 pub fn write_cols_to_slicerust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]write_cols_to_slice().(self, slice: &mut [f32]) {
359 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.25.0 f32/sse2/mat3a/Mat3A#x_axis..xrust-analyzer cargo glam 0.25.0 deref/Vec3#x.;
360 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.25.0 f32/sse2/mat3a/Mat3A#x_axis..yrust-analyzer cargo glam 0.25.0 deref/Vec3#y.;
361 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.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..zrust-analyzer cargo glam 0.25.0 deref/Vec3#z.;
362 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.25.0 f32/sse2/mat3a/Mat3A#y_axis..xrust-analyzer cargo glam 0.25.0 deref/Vec3#x.;
363 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..yrust-analyzer cargo glam 0.25.0 deref/Vec3#y.;
364 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().5]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..zrust-analyzer cargo glam 0.25.0 deref/Vec3#z.;
365 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..xrust-analyzer cargo glam 0.25.0 deref/Vec3#x.;
366 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().7]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..yrust-analyzer cargo glam 0.25.0 deref/Vec3#y.;
367 slice[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut().8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/IndexMut#index_mut(). = self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..zrust-analyzer cargo glam 0.25.0 deref/Vec3#z.;
368 }
369
370 /// Returns the matrix column for the given `index`.
371 ///
372 /// # Panics
373 ///
374 /// Panics if `index` is greater than 2.
375 #[inline]
376 #[must_use]
377 pub fn colrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]col().(&self, index: usize) -> Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A# {
378 match index {
379 0 => self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.,
380 1 => self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.,
381 2 => self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.,
382 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
383 }
384 }
385
386 /// Returns a mutable reference to the matrix column for the given `index`.
387 ///
388 /// # Panics
389 ///
390 /// Panics if `index` is greater than 2.
391 #[inline]
392 pub fn col_mutrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]col_mut().(&mut self, index: usize) -> &mut Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A# {
393 match index {
394 0 => &mut self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.,
395 1 => &mut self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.,
396 2 => &mut self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.,
397 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
398 }
399 }
400
401 /// Returns the matrix row for the given `index`.
402 ///
403 /// # Panics
404 ///
405 /// Panics if `index` is greater than 2.
406 #[inline]
407 #[must_use]
408 pub fn rowrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]row().(&self, index: usize) -> Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A# {
409 match index {
410 0 => Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..xrust-analyzer cargo glam 0.25.0 deref/Vec3#x., self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..xrust-analyzer cargo glam 0.25.0 deref/Vec3#x., self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..xrust-analyzer cargo glam 0.25.0 deref/Vec3#x.),
411 1 => Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..yrust-analyzer cargo glam 0.25.0 deref/Vec3#y., self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..yrust-analyzer cargo glam 0.25.0 deref/Vec3#y., self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..yrust-analyzer cargo glam 0.25.0 deref/Vec3#y.),
412 2 => Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::newrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]new().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..zrust-analyzer cargo glam 0.25.0 deref/Vec3#z., self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..zrust-analyzer cargo glam 0.25.0 deref/Vec3#z., self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..zrust-analyzer cargo glam 0.25.0 deref/Vec3#z.),
413 _ => panicrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/panic!!("index out of bounds"),
414 }
415 }
416
417 /// Returns `true` if, and only if, all elements are finite.
418 /// If any element is either `NaN`, positive or negative infinity, this will return `false`.
419 #[inline]
420 #[must_use]
421 pub fn is_finiterust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]is_finite().(&self) -> bool {
422 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..is_finiterust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]is_finite().() && self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..is_finiterust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]is_finite().() && self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..is_finiterust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]is_finite().()
423 }
424
425 /// Returns `true` if any elements are `NaN`.
426 #[inline]
427 #[must_use]
428 pub fn is_nanrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]is_nan().(&self) -> bool {
429 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..is_nanrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]is_nan().() || self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..is_nanrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]is_nan().() || self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..is_nanrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]is_nan().()
430 }
431
432 /// Returns the transpose of `self`.
433 #[inline]
434 #[must_use]
435 pub fn transposerust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]transpose().(&self) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
436 unsafe {
437 let tmp0 = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0., self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0., 0b01_00_01_00);
438 let tmp1 = _mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0., self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0., 0b11_10_11_10);
439
440 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
441 x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#(_mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(tmp0, self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0., 0b00_00_10_00)),
442 y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#(_mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(tmp0, self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0., 0b01_01_11_01)),
443 z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#(_mm_shuffle_psrust-analyzer cargo core https://github.com/rust-lang/rust/library/core core_arch/x86/sse/_mm_shuffle_ps().(tmp1, self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..0rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#0., 0b10_10_10_00)),
444 }
445 }
446 }
447
448 /// Returns the determinant of `self`.
449 #[inline]
450 #[must_use]
451 pub fn determinantrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]determinant().(&self) -> f32 {
452 self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..dotrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]dot().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..crossrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]cross().(self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.))
453 }
454
455 /// Returns the inverse of `self`.
456 ///
457 /// If the matrix is not invertible the returned matrix will be invalid.
458 ///
459 /// # Panics
460 ///
461 /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled.
462 #[inline]
463 #[must_use]
464 pub fn inverserust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]inverse().(&self) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
465 let tmp0 = self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..crossrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]cross().(self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.);
466 let tmp1 = self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..crossrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]cross().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.);
467 let tmp2 = self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..crossrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]cross().(self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.);
468 let det = self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..dotrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]dot().(tmp2);
469 glam_assertrust-analyzer cargo glam 0.25.0 macros/glam_assert!!(det != 0.0);
470 let inv_det = Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#::splatrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]splat().(det.reciprust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]recip().());
471 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(tmp0.mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<Self>`]mul().(inv_det), tmp1.mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<Self>`]mul().(inv_det), tmp2.mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<Self>`]mul().(inv_det)).transposerust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]transpose().()
472 }
473
474 /// Transforms the given 2D vector as a point.
475 ///
476 /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `1`.
477 ///
478 /// This method assumes that `self` contains a valid affine transform.
479 ///
480 /// # Panics
481 ///
482 /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.
483 #[inline]
484 #[must_use]
485 pub fn transform_point2rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]transform_point2().(&self, rhs: Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#) -> Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2# {
486 glam_assertrust-analyzer cargo glam 0.25.0 macros/glam_assert!!(self.row(2).abs_diff_eq(Vec3A::Z, 1e-6));
487 Mat2rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/Mat2#::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2]from_cols().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..xyrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xy().(), self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..xyrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xy().()) rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]mul().*rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]mul(). rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]mul().rhs rust-analyzer cargo glam 0.25.0 f32/vec2/impl#[Vec2][`Add<Self>`]add().+rust-analyzer cargo glam 0.25.0 f32/vec2/impl#[Vec2][`Add<Self>`]add(). rust-analyzer cargo glam 0.25.0 f32/vec2/impl#[Vec2][`Add<Self>`]add().self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..xyrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xy().()
488 }
489
490 /// Rotates the given 2D vector.
491 ///
492 /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `0`.
493 ///
494 /// This method assumes that `self` contains a valid affine transform.
495 ///
496 /// # Panics
497 ///
498 /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.
499 #[inline]
500 #[must_use]
501 pub fn transform_vector2rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]transform_vector2().(&self, rhs: Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2#) -> Vec2rust-analyzer cargo glam 0.25.0 f32/vec2/Vec2# {
502 glam_assertrust-analyzer cargo glam 0.25.0 macros/glam_assert!!(self.row(2).abs_diff_eq(Vec3A::Z, 1e-6));
503 Mat2rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/Mat2#::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2]from_cols().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..xyrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xy().(), self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..xyrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xy().()) rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]mul().*rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]mul(). rust-analyzer cargo glam 0.25.0 f32/sse2/mat2/impl#[Mat2][`Mul<Vec2>`]mul().rhs
504 }
505
506 /// Transforms a 3D vector.
507 #[inline]
508 #[must_use]
509 pub fn mul_vec3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_vec3().(&self, rhs: Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#) -> Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3# {
510 self.mul_vec3arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_vec3a().(rhs.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()
511 }
512
513 /// Transforms a [`Vec3A`].
514 #[inline]
515 #[must_use]
516 pub fn mul_vec3arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_vec3a().(&self, rhs: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#) -> Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A# {
517 let mut res = self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<Self>`]mul().(rhs.xxxrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]xxx().());
518 res = res.addrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Add<Self>`]add().(self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<Self>`]mul().(rhs.yyyrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]yyy().()));
519 res = res.addrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Add<Self>`]add().(self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<Self>`]mul().(rhs.zzzrust-analyzer cargo glam 0.25.0 swizzles/sse2/vec3a_impl/impl#[Vec3A][Vec3Swizzles]zzz().()));
520 res
521 }
522
523 /// Multiplies two 3x3 matrices.
524 #[inline]
525 #[must_use]
526 pub fn mul_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_mat3().(&self, rhs: &Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
527 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
528 self.mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3A>`]mul().(rhs.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.),
529 self.mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3A>`]mul().(rhs.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.),
530 self.mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3A>`]mul().(rhs.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.),
531 )
532 }
533
534 /// Adds two 3x3 matrices.
535 #[inline]
536 #[must_use]
537 pub fn add_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]add_mat3().(&self, rhs: &Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
538 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
539 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..addrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Add<Self>`]add().(rhs.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.),
540 self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..addrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Add<Self>`]add().(rhs.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.),
541 self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..addrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Add<Self>`]add().(rhs.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.),
542 )
543 }
544
545 /// Subtracts two 3x3 matrices.
546 #[inline]
547 #[must_use]
548 pub fn sub_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]sub_mat3().(&self, rhs: &Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
549 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
550 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..subrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Sub<Self>`]sub().(rhs.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.),
551 self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..subrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Sub<Self>`]sub().(rhs.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.),
552 self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..subrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Sub<Self>`]sub().(rhs.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.),
553 )
554 }
555
556 /// Multiplies a 3x3 matrix by a scalar.
557 #[inline]
558 #[must_use]
559 pub fn mul_scalarrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_scalar().(&self, rhs: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A] {
560 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(
561 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<f32>`]mul().(rhs),
562 self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<f32>`]mul().(rhs),
563 self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..mulrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`Mul<f32>`]mul().(rhs),
564 )
565 }
566
567 /// Returns true if the absolute difference of all elements between `self` and `rhs`
568 /// is less than or equal to `max_abs_diff`.
569 ///
570 /// This can be used to compare if two matrices contain similar elements. It works best
571 /// when comparing with a known value. The `max_abs_diff` that should be used used
572 /// depends on the values being compared against.
573 ///
574 /// For more see
575 /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).
576 #[inline]
577 #[must_use]
578 pub fn abs_diff_eqrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]abs_diff_eq().(&self, rhs: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A], max_abs_diff: f32) -> bool {
579 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..abs_diff_eqrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]abs_diff_eq().(rhs.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis., max_abs_diff)
580 && self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..abs_diff_eqrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]abs_diff_eq().(rhs.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis., max_abs_diff)
581 && self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..abs_diff_eqrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]abs_diff_eq().(rhs.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis., max_abs_diff)
582 }
583
584 #[inline]
585 pub fn as_dmat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]as_dmat3().(&self) -> DMat3rust-analyzer cargo glam 0.25.0 f64/dmat3/DMat3# {
586 DMat3rust-analyzer cargo glam 0.25.0 f64/dmat3/DMat3#::from_colsrust-analyzer cargo glam 0.25.0 f64/dmat3/impl#[DMat3]from_cols().(
587 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..as_dvec3rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]as_dvec3().(),
588 self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..as_dvec3rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]as_dvec3().(),
589 self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..as_dvec3rust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A]as_dvec3().(),
590 )
591 }
592 }
593
594 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
595 #[inline]
596 fn defaultrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Default]default().() -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Default] {
597 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Default]::IDENTITYrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]IDENTITY.
598 }
599 }
600
601 impl Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
602 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Add<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Add<Self>`];
603 #[inline]
604 fn addrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Add<Self>`]add().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Add<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Add<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#Output# {
605 self.add_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]add_mat3().(&rhs)
606 }
607 }
608
609 impl AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#<Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
610 #[inline]
611 fn add_assignrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`AddAssign<Self>`]add_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`AddAssign<Self>`]) {
612 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.add_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]add_mat3().(&rhs);
613 }
614 }
615
616 impl Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
617 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sub<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sub<Self>`];
618 #[inline]
619 fn subrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sub<Self>`]sub().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sub<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sub<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#Output# {
620 self.sub_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]sub_mat3().(&rhs)
621 }
622 }
623
624 impl SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#<Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
625 #[inline]
626 fn sub_assignrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`SubAssign<Self>`]sub_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`SubAssign<Self>`]) {
627 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.sub_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]sub_mat3().(&rhs);
628 }
629 }
630
631 impl Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg# for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
632 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Neg]Output# = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Neg];
633 #[inline]
634 fn negrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Neg]neg().(self) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Neg]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#Output# {
635 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][Neg]::from_colsrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]from_cols().(self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..negrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][Neg]neg().(), self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..negrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][Neg]neg().(), self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..negrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][Neg]neg().())
636 }
637 }
638
639 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
640 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Self>`]Output# = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Self>`];
641 #[inline]
642 fn mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Self>`]mul().(self, rhs: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Self>`]) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Self>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
643 self.mul_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_mat3().(&rhs)
644 }
645 }
646
647 impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
648 #[inline]
649 fn mul_assignrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`MulAssign<Self>`]mul_assign().(&mut self, rhs: Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`MulAssign<Self>`]) {
650 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self = self.mul_mat3rust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_mat3().(&rhs);
651 }
652 }
653
654 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
655 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3A>`]Output# = Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#;
656 #[inline]
657 fn mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3A>`]mul().(self, rhs: Vec3Arust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/Vec3A#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3A>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
658 self.mul_vec3arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_vec3a().(rhs)
659 }
660 }
661
662 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#> for f32 {
663 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[f32][`Mul<Mat3A>`]Output# = Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#;
664 #[inline]
665 fn mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[f32][`Mul<Mat3A>`]mul().(self, rhs: Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[f32][`Mul<Mat3A>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
666 rhs.mul_scalarrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_scalar().(self)
667 }
668 }
669
670 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<f32> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
671 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<f32>`]Output# = Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<f32>`];
672 #[inline]
673 fn mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<f32>`]mul().(self, rhs: f32) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<f32>`]::Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# {
674 self.mul_scalarrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_scalar().(rhs)
675 }
676 }
677
678 impl MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<f32> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
679 #[inline]
680 fn mul_assignrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`MulAssign<f32>`]mul_assign().(&mut self, rhs: f32) {
681 *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.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_scalar().(rhs);
682 }
683 }
684
685 impl Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
686 type Outputrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3>`]Output# = Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#;
687 #[inline]
688 fn mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Vec3>`]mul().(self, rhs: Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3#) -> Vec3rust-analyzer cargo glam 0.25.0 f32/vec3/Vec3# {
689 self.mul_vec3arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]mul_vec3a().(rhs.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()
690 }
691 }
692
693 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<Mat3rust-analyzer cargo glam 0.25.0 f32/mat3/Mat3#> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
694 #[inline]
695 fn fromrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`From<Mat3>`]from().(m: Mat3rust-analyzer cargo glam 0.25.0 f32/mat3/Mat3#) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`From<Mat3>`] {
696 Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`From<Mat3>`] {
697 x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.: m.x_axisrust-analyzer cargo glam 0.25.0 f32/mat3/Mat3#x_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
698 y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.: m.y_axisrust-analyzer cargo glam 0.25.0 f32/mat3/Mat3#y_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
699 z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.: m.z_axisrust-analyzer cargo glam 0.25.0 f32/mat3/Mat3#z_axis..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
700 }
701 }
702 }
703
704 impl Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<Self>`]> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
705 fn sumrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<Self>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<Self>`]
706 where
707 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.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<Self>`]>,
708 {
709 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<Self>`]::ZEROrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]ZERO., Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<Self>`]::addrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Add<Self>`]add().)
710 }
711 }
712
713 impl<'a> Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<&'a Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<&'a Mat3A>`]> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
714 fn sumrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<&'a Mat3A>`]sum().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<&'a Mat3A>`]
715 where
716 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.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<&'a Mat3A>`]>,
717 {
718 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<&'a Mat3A>`]::ZEROrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]ZERO., |a, &b| Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Sum<&'a Mat3A>`]::addrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Add<Self>`]add().(a, b))
719 }
720 }
721
722 impl Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product# for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
723 fn productrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<Self>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<Self>`]
724 where
725 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.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<Self>`]>,
726 {
727 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<Self>`]::IDENTITYrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]IDENTITY., Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<Self>`]::mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Self>`]mul().)
728 }
729 }
730
731 impl<'a> Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#<&'a Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<&'a Mat3A>`]> for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
732 fn productrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<&'a Mat3A>`]product().<I>(iter: I) -> Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<&'a Mat3A>`]
733 where
734 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.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<&'a Mat3A>`]>,
735 {
736 iter.foldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#fold().(Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<&'a Mat3A>`]::IDENTITYrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A]IDENTITY., |a, &b| Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Product<&'a Mat3A>`]::mulrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`Mul<Self>`]mul().(a, b))
737 }
738 }
739
740 impl PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq# for Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
741 #[inline]
742 fn eqrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`PartialEq<Self>`]eq().(&self, rhs: &Selfrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][`PartialEq<Self>`]) -> bool {
743 self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis..eqrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`PartialEq<Self>`]eq().(&rhs.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis.) && self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis..eqrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`PartialEq<Self>`]eq().(&rhs.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis.) && self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis..eqrust-analyzer cargo glam 0.25.0 f32/sse2/vec3a/impl#[Vec3A][`PartialEq<Self>`]eq().(&rhs.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.)
744 }
745 }
746
747 #[cfg(not(target_arch = "spirv"))]
748 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 Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
749 fn fmtrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][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# {
750 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!!(Mat3A))
751 .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.25.0 f32/sse2/mat3a/Mat3A#x_axis.)
752 .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.25.0 f32/sse2/mat3a/Mat3A#y_axis.)
753 .fieldrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]field().("z_axis", &self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.)
754 .finishrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/builders/impl#[`DebugStruct<'a, 'b>`]finish().()
755 }
756 }
757
758 #[cfg(not(target_arch = "spirv"))]
759 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 Mat3Arust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A# {
760 fn fmtrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/impl#[Mat3A][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# {
761 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "[{}, {}, {}]", self.x_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#x_axis., self.y_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#y_axis., self.z_axisrust-analyzer cargo glam 0.25.0 f32/sse2/mat3a/Mat3A#z_axis.)
762 }
763 }