Debian Codegraph @

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

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